Xubuntu 18.04: Temporary failure in name resolution
Posted: Fri Feb 22, 2019 1:58 am
[PROBLEM]
It's annoying
I have a proper DNS/DHCP set up at home (on Raspbian ) and would have proper name resolution, but due to the recent introduction of dnsmasq or systemd-resolvd, I'm having name resolving issues all the time.
Since 18.04, I always have "127.0.0.53" as DNS IP in /etc/resolv.conf.
And my LAN services stop working every other day.
When I try to ping the machine that seems to be unavailable, I get:
And I'm not the only one...
[SOLUTION]
You have to disable "systemd-resolvd":
1) Disable and stop the "systemd-resolvd" service:
2) Move the /etc/resolv.conf symbolic link:
Move the symlink to "/run/systemd/resolve/stub-resolv.conf" aside, to "resolv.conf.org" (as backup):
Now it looks like this:
Edit /etc/NetworkManager/NetworkManager.conf (but make a backup before ) - and add the following 2 options under [main]
4) Restart NetworkManager:
If all went well, and you are not connected to a network, your /etc/resolv.conf should now look iike this:
btw: This also greatly speeds up the name resolution for everything now!
Actually, I'd rather like to leave it on, because the developers had a reason to put it there, but it just breaks name resolution completely most of the time...
Links:
It's annoying
I have a proper DNS/DHCP set up at home (on Raspbian ) and would have proper name resolution, but due to the recent introduction of dnsmasq or systemd-resolvd, I'm having name resolving issues all the time.
Since 18.04, I always have "127.0.0.53" as DNS IP in /etc/resolv.conf.
And my LAN services stop working every other day.
When I try to ping the machine that seems to be unavailable, I get:
"Temporary failure in name resolution"
And I'm not the only one...
[SOLUTION]
You have to disable "systemd-resolvd":
1) Disable and stop the "systemd-resolvd" service:
Code: Select all
$ systemctl disable systemd-resolved
$ systemctl stop systemd-resolved
Move the symlink to "/run/systemd/resolve/stub-resolv.conf" aside, to "resolv.conf.org" (as backup):
Code: Select all
$ mv /etc/resolv.conf /etc/resolv.conf.org
3) Then, tell NetworkManager to take care of DNS/resolv.conf again:lrwxrwxrwx 1 root root 39 Jän 29 17:00 /etc/resolv.conf.org -> ../run/systemd/resolve/stub-resolv.conf
Edit /etc/NetworkManager/NetworkManager.conf (but make a backup before ) - and add the following 2 options under [main]
So it looks like this afterwards:dns=default
rc-manager=resolvconf
Code: Select all
[main]
plugins=ifupdown,keyfile
dns=default
rc-manager=resolvconf
Code: Select all
$ systemctl restart NetworkManager
If all went well, and you are not connected to a network, your /etc/resolv.conf should now look iike this:
And if you connect to a network, it should contain the DNS IPs and search masks as proposed by the DHCP server# Generated by NetworkManager
btw: This also greatly speeds up the name resolution for everything now!
Actually, I'd rather like to leave it on, because the developers had a reason to put it there, but it just breaks name resolution completely most of the time...
Links: