Xubuntu 18.04: Temporary failure in name resolution

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....

Xubuntu 18.04: Temporary failure in name resolution

Postby ^rooker » Fri Feb 22, 2019 1:58 am

It's annoying :?
I have a proper DNS/DHCP set up at home (on Raspbian :D) 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 "" 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...

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

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):
Code: Select all
$ mv /etc/resolv.conf /etc/resolv.conf.org

Now it looks like this:
lrwxrwxrwx 1 root root 39 Jän 29 17:00 /etc/resolv.conf.org -> ../run/systemd/resolve/stub-resolv.conf

3) Then, tell NetworkManager to take care of DNS/resolv.conf again:
Edit /etc/NetworkManager/NetworkManager.conf (but make a backup before ;)) - and add the following 2 options under [main]

So it looks like this afterwards:
Code: Select all

4) Restart NetworkManager:
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:
# Generated by NetworkManager

And if you connect to a network, it should contain the DNS IPs and search masks as proposed by the DHCP server :D

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...

  • https://blog.mesouug.com/2018/09/22/how-to-correctly-disable-systemd-resolved-on-ubuntu-18-04/
  • https://www.hiroom2.com/2017/08/24/ubuntu-1610-nameserver-127-0-0-53-en/
  • https://www.admintome.com/blog/turning-off-systemd-resolvd/
  • 0

Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
User avatar
Site Admin
Posts: 1450
Joined: Fri Aug 29, 2003 8:39 pm
Reputation: 0

Return to Knowledge Base

Who is online

Users browsing this forum: No registered users and 4 guests

Who is online over last 24 hours

Users browsed this forum in the last 24 hours: Google [Bot], Majestic-12 [Bot] and 17 guests

Reputation System ©'