Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Temporary error in name resolution [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
B10bot
n00b
n00b


Joined: 24 May 2019
Posts: 18

PostPosted: Fri May 24, 2019 2:09 am    Post subject: Temporary error in name resolution [SOLVED] Reply with quote

I have just booted into a fresh installation of Gentoo and my network interface, wlp2s0, has been recognized. I can initialize it, but when any type of networking is attempted, it returns the error
Code:

ping: gentoo.org: Temporary failure in name resolution


The example above is after a ping to gentoo.org, but it happens anytime I try to connect to the network. A line from the output of an emerge is
Code:

Resolving mirrors.rit.edu... failed: Temporary failure in name resolution.


I suspect this is a DNS related error. In a previous thread discussing this problem the solution was to make sure the user could read from resolv.conf, however, I have done this and I am also root for good measure. This fix is not working for me.

Does anyone have any idea what this could be? I'm happy to provide any additional information about the system necessary.

Thanks in advance.


Last edited by B10bot on Sun May 26, 2019 4:34 am; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 16022

PostPosted: Fri May 24, 2019 2:47 am    Post subject: Reply with quote

How did you initialize your network interface? Which DHCP client did you use? Does your DHCP server offer nameservers? Did your DHCP client record those nameservers in /etc/resolv.conf?
Back to top
View user's profile Send private message
B10bot
n00b
n00b


Joined: 24 May 2019
Posts: 18

PostPosted: Fri May 24, 2019 9:48 pm    Post subject: Reply with quote

Hu wrote:
How did you initialize your network interface? Which DHCP client did you use? Does your DHCP server offer nameservers? Did your DHCP client record those nameservers in /etc/resolv.conf?

I have initialized my network. As a side note, doing this produces a message saying that my interface has started, but is inactive. I looked this up, but most people said this was not a problem. I'm pretty sure that I am using my DHCP clients nameservers and I have recorded them in /etc/resolv.conf.

Just in case I have done this wrong, here is my /etc/resolv.conf.
Code:
nameserver 209.18.47.61

_________________
Gentoo noob.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4153
Location: Illinois, USA

PostPosted: Fri May 24, 2019 9:58 pm    Post subject: Reply with quote

You didn't answer Hu's first three questions and only answered the fourth be implication ("no, I added it manually")
Please answer all the questions.
That looks like a valid Spectrum DNS server. Answering the other questions may tell us why it's not working and why you get the message" interface started but is inactive".
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46371
Location: 56N 3W

PostPosted: Fri May 24, 2019 10:03 pm    Post subject: Reply with quote

B10bot,

Can yo post the output of dmesg. wgetpaste is you friend.
You will need to write it to a file then pastebin it once you reboot.
Code:
dmesg > /root/dmesg.txt
will save dmesg to /root/dmesg.txt.

Once you reboot and mount your gentoo root. pastebin /mnt/gentoo/root/dmesg.

We also need to see the output of
Code:
ifconfig -a
and
Code:
route


It all needs to be while booted from gentoo, so the same save it to a file, post later process is required.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 16022

PostPosted: Sat May 25, 2019 12:27 am    Post subject: Reply with quote

One possibility, which is not likely given the information so far, but cannot be ruled out from the information shown, is that /etc/resolv.conf has restrictive permissions that are preventing the programs from reading it. This is easy to check. OP: what is the output of ls -l /etc/resolv.conf?
Back to top
View user's profile Send private message
B10bot
n00b
n00b


Joined: 24 May 2019
Posts: 18

PostPosted: Sat May 25, 2019 9:46 pm    Post subject: Reply with quote

Tony0945 wrote:
You didn't answer Hu's first three questions and only answered the fourth be implication ("no, I added it manually")
Please answer all the questions.
That looks like a valid Spectrum DNS server. Answering the other questions may tell us why it's not working and why you get the message" interface started but is inactive".

I initialize the interface with /etc/init.d/net.wlp2s0. I added dhcp to the /etc/conf.d/net file, which I assume enables DHCP.
Code:
config_wlp2s0="dhcp"
modules_wlp2s0="wpa_supplicant"

If what you mean by my DHCP server offering nameservers is my router offering nameservers, in a way that I could specify my router as a DNS server, than yes, I think so.

Here is the output of dmesg: https://pastebin.com/BfkYqdzK
Here is the output of ifconfig -a: https://pastebin.com/tw4ey9Nj
Here is the output of route: https://pastebin.com/SfK8SDdj
In the case of route I have it goes back and forth between the two outputs. I have no idea why and pings/emerges don't work in either situation. ip route correlates with this where sometimes it shows and output and sometimes it doesn't. Something else is that at the end of dmesg it looks like there is some authentication problems, but I'm not sure. The current output is the blank table.

The output of ls -l /etc/resolv.conf is
Code:
-rw-r--r-- 1 root root 24 May 25 00:34 /etc/resolv.conf

It looks like everyone can at least read it. I am also currently root, so I should be fine if only root can write, I think.

edit: I just realized that adding a static ip to /etc/conf.d/net and the dhcp flag to the config_wlp2s0 variable might be a problem.
edit 2: I changed files after rereading the Netifrc page on the wiki. Unfortunately, it didn't get rid of the error.
_________________
Gentoo noob.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4153
Location: Illinois, USA

PostPosted: Sat May 25, 2019 10:39 pm    Post subject: Reply with quote

I'm no expert but the think that dhcp= just gets you an address.

I have in my config
Code:

routes_eth0="default via 192.168.0.1"
dns_servers="192.168.0.102 127.0.0.1 198.192.0.1"
I'm using eth0, adjust as required. {My router is at 192.168.0.1 and I run dnsmasq on 192.168.0.102)
Back to top
View user's profile Send private message
B10bot
n00b
n00b


Joined: 24 May 2019
Posts: 18

PostPosted: Sat May 25, 2019 10:53 pm    Post subject: Reply with quote

Tony0945 wrote:
I'm no expert but the think that dhcp= just gets you an address.

I have in my config
Code:

routes_eth0="default via 192.168.0.1"
dns_servers="192.168.0.102 127.0.0.1 198.192.0.1"
I'm using eth0, adjust as required. {My router is at 192.168.0.1 and I run dnsmasq on 192.168.0.102)

So should I add your config to my file, or should I drop the config_wlp2s0="dhcp" and just use the one you have? Also the original contents of my /etc/resolv.conf was my routers IP address(after I copied it from the live environment during intallation). Should I change it back to this? Another point of confusion is dhcpcd. Should I bother with it, or will Netifrc cover DHCP?
_________________
Gentoo noob.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4153
Location: Illinois, USA

PostPosted: Sat May 25, 2019 11:23 pm    Post subject: Reply with quote

I run static addresses. I see from ifconfig that you are getting an address, so dhcp is working. If I were running your system (and I am by NO means an authority!) I would have the following /etc/conf.d/net:
Code:

config_wlp2s0="dhcp"
modules_wlp2s0="wpa_supplicant"
routes_wlp2s0="default via 192.168.1.0"
dns_servers="209.18.47.61"

IIRC, you could have "config=" and "routes=" without the qualifier and they would apply to both interfaces. I see you have two, I assume one wired and one wireless". BTW, I have set up two wireless systems with a LOT of googling and I've mercifully forgotten what I knew about wpa_supplicant.
Is the wired connection work
I'm confused by the three intel drivers. IIRC lsmod will tell which are in actual use.

Are you sure the router is at 192.168.1.0 not 192.168.1.1 or 192.168.0.1 ? What make is it? DLink, Netgear? or ?
You will never get to the internet if it is wrong.
Back to top
View user's profile Send private message
B10bot
n00b
n00b


Joined: 24 May 2019
Posts: 18

PostPosted: Sun May 26, 2019 1:28 am    Post subject: Reply with quote

A issue seems to have been that wpa_supplicant has been failing to authenticate. In dmesg it shows that is de-authenticates because of a local choice. So I removed wpa_supplicant from the default runlevel, plugged into ethernet and I tried pinging. I tried gentoo.org first, but that failed. Then I tried Google's 8.8.8.8. The ping went through. I can also ping the IP address of gentoo.org.

At this point I have narrowed it down to two errors. The first is a problem with authenticating to my network. The error seems to be this:
Code:
[  451.424336] wlp2s0: deauthenticating from 1a:59:c0:3b:a8:1a by local choice (Reason: 3=DEAUTH_LEAVING)

I looked it up and couldn't find anything that works for me, but it seems to be a problem with wpa_supplicant. Because of this pinging an IP while I'm not on ethernet results in an error saying the network is unreachable.

The second error is with the domain name server, I'm guessing, since even while on ethernet I still get the error
Code:
ping: gentoo.org: Temporary failure in name resolution


I don't know what to do about either.

edit: It seems like turning running rc-update del wpa_supplicant default to remove wpa_supplicant from the runlevel was what really fixed the problem. I unplugged from ethernet and it authed fine and I can ping IP addresses. However I still have the second error with the domain name server.
edit 2: So I realized a lot of things, so here is an overall update.
The reason the auth was failing was because two instances of wpa_supplicant were being made. /etc/conf.d/net was spawning one because of the definition in modules_wlp2s0, and OpenRC was also making one because it had been added to the default runlevel. For some reason this screwed up the authentication and it deauthed because of it.
This is the current output of dmesg: https://pastebin.com/2KDrP9FQ
This is my current /etc/conf.d/net:
Code:
config_wlp2s0="dhcp"
modules_wlp2s0="wpa_supplicant"
routes_wlp2s0="default via 192.168.1.1"
dns_servers="209.18.47.61 209.18.47.62"

I changed my /etc/resolv.conf(it had been edited by edited by dhcpcd while I was trying to fix the problem) and it now works.
edit 3: Sorry about the large amount of edits.
_________________
Gentoo noob.


Last edited by B10bot on Sun May 26, 2019 2:20 am; edited 1 time in total
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4153
Location: Illinois, USA

PostPosted: Sun May 26, 2019 1:53 am    Post subject: Reply with quote

Try with:
Code:
dns_servers="209.18.47.61 8.8.8.8"
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4153
Location: Illinois, USA

PostPosted: Sun May 26, 2019 2:11 am    Post subject: Reply with quote

Just ran DNS Benchmark on my XP system and it says 209. 18. 47. 61 is dead. Maybe because I'm on a different ISP.
I suggest removing it from dns_servers= and just using 8.8.8.8 until this is resolved.
I vaguely remember having screwed up something in wp_supplicant. I added the pasword instead of the transformed password. Something like that.
Let's get wired working, then move to wireless.
What make and model is the router?
Back to top
View user's profile Send private message
B10bot
n00b
n00b


Joined: 24 May 2019
Posts: 18

PostPosted: Sun May 26, 2019 2:32 am    Post subject: Reply with quote

My /etc/resolv.conf had been edited by dhcpcd and when I fixed it, pings started working. This is the /etc/conf.d/net I ended up with:
Code:
config_wlp2s0="dhcp"
modules_wlp2s0="wpa_supplicant"
routes_wlp2s0="default via 192.168.1.1"
dns_servers="209.18.47.61 209.18.47.62"
(Thanks Tony0945)
And the /etc/resolve.conf I ended up with:
Code:
nameserver 209.18.47.61
nameserver 209.18.47.62

The two problems were 1) I made 2 separate instances of wpa_supplicant which caused authentication to fail, and 2) I either had a bad DNS server defined in /etc/conf.d/net or /etc/resolve.conf at all times, making it so one would always cause a failure.

Thanks, and everyone was very helpful.
_________________
Gentoo noob.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4153
Location: Illinois, USA

PostPosted: Sun May 26, 2019 2:45 am    Post subject: Reply with quote

Very glad it's working! Edit your first post to prepend "[SOLVED]" (without quotes) to the title.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum