DNS not working after upgrade 17.04 to 17.10
Solution 1
I was updating Ubuntu today form version 16.10 through 17.04 to 17.10. For me too DNS stopped working. The resolv.conf
symlink was
/etc/resolv.conf -> /run/NetworkManager/resolv.conf
This is apparently wrong for 17.10.
The error message the previous poster got is from the output of resolvconf -service
:
$ systemctl status resolvconf
It gave the following output.
resolvconf[623]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf
By removing the original symlink, linking to /run/resolvconf/resolv.conf
to /etc/resolv.conf
and restarting the resolvconf -service DNS began working again:
$ sudo rm /etc/resolv.conf
$ sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
$ systemctl restart resolvconf
Interestingly the exit code of the resolvconf-service
was success even before the symlink was pointing towards the correct file.
Solution 2
I found this bug reported here: https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1725840; please confirm that you also suffering from it. It is resolved through a simple dpkg-reconfigure resolvconf
.
Solution 3
I ran into the same issue and saw this looking at resolvconf
Oct 20 00:36:17 drew-8570w resolvconf[708]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf
Recreating the symlink fixed it. Now using 127.0.0.53 by default now?
$ ls -al /etc/resolv.conf
lrwxrwxrwx 1 root drew 27 Apr 6 2017 /etc/resolv.conf -> /run/resolvconf/resolv.conf
$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 127.0.0.53
Related videos on Youtube
Conor O'Neill
Updated on September 18, 2022Comments
-
Conor O'Neill almost 2 years
I've just upgraded my laptop from Xubuntu 17.04 to 17.10. After the final reboot, DNS has stopped working. This is obviously a problem! I can ping known IP addresses; just no DNS resolution.
I've not fiddled with any DNS settings; as far as I know, I had the standard DNS configuration previously. Its just a laptop which uses DHCP to get details from my home WiFi router.
Obviously, the ability to diagnose this is limited when the system itself can't resolve any web addresses. I did some googling on my phone, and most of the answers I found seemed to recommend turning dnsmasq off. However, dnsmasq was already off. But
/etc/resolv.conf
was showing 127.0.1.1, which seems to imply that it was expecting dnsmasq to be running.I turned dnsmasq ON, by editing
/etc/NetworkManager/NetworkManager.conf
and adding[main] dns=dnsmasq
and then I ran this command
sudo systemctl restart NetworkManager
My DNS resolution is now working.
However, given that the default Ubuntu configuration is not to use dnsmasq, what should I actually have done to diagnose and fix this instead?
-
EnverOsmanov over 6 yearsWhere did you saw the warning? What command should I run?
-
Conor O'Neill over 6 yearsThank you, but this hasn't fixed the DNS problem for me. I tried the new symlink, but not working. I reverted back to the old symlink, also with dnsmasq in the config file, and this still works. As I asked earlier, does anyone know how I should diagnose this?
-
Casey over 6 yearsFantastic! Exactly my issue. So... how does one alert Canonical about this?
-
Panther over 6 yearsYou should probably file a bug report so this behavior on upgrade is fixed.
-
edap over 6 yearsThis is the only solution that worked for me, I had the same problem after installing ubuntu 17.10 from the website ~ 1 week ago. Thanks for sharing
-
ferdy over 6 yearsfixed my problem when switching from 17.04 to 17.10. issues with openvpn dns as well.
-
Dan Dascalescu almost 4 yearsThis did nothing for
Temporary failure in name resolution
after upgrading from 16.04 to 18.04.