How do I debug "Temporary failure in name resolution" error after upgrading to Xubuntu 19.04 desktop?
I suggest that you recreate the missing netplan file; from the terminal:
sudo nano /etc/netplan/01-network-manager-all.yaml
Add the following:
network:
version: 2
renderer: NetworkManager
The spacing and indentation are critical and must be correct. Proofread carefully twice. Save (Ctrl+o followed by Enter) and exit (Ctrl+x) the text editor. Follow with:
sudo netplan generate
sudo netplan apply
Next, in your case, resolv.conf is not pointing to systemd as expected. Therefore, I suggest that you remove and recreate the link:
sudo rm -f /etc/resolv.conf
sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
Reboot and tell us if there is any improvement.
![Mark Northrop](https://i.stack.imgur.com/J83fi.jpg?s=256&g=1)
Mark Northrop
Updated on September 18, 2022Comments
-
Mark Northrop almost 2 years
I recently upgraded Xubuntu from 18.10 to 19.04, and have started seeing the "Temporary failure in name resolution" error whenever I try to ping a domain name since then. I am using a desktop computer with a single ethernet connection to a modem/router. I have been upgrading the same install of Xubuntu for years; I'm not sure when I last did a fresh install.
Pinging an IP address works just fine, only pinging domain names causes this error.
If I disconnect and then reconnect the ethernet connection using the Network Manager panel applet (screenshot below), the error goes away and the internet connection works until I reboot the computer.
These are my connection's settings:
On a fresh boot, these are the abridged results of a few commands that I've run to try to diagnose the issue before fixing the issue by disconnecting and reconnecting:
$ systemd-resolve --status
Link 2 (eth0) Current Scopes: DNS DefaultRoute setting: yes LLMNR setting: yes MulticastDNS setting: no DNSOverTLS setting: no DNSSEC setting: no DNSSEC supported: no DNS Servers: 8.8.8.8 8.8.4.4 DNS Domain: ~.
$ nmcli device show eth0
IP4.ADDRESS[1]: 192.168.1.8/24 IP4.GATEWAY: 192.168.1.1 IP4.ROUTE[1]: dst = 0.0.0.0/0, nh = 192.168.1.1, mt = 100 IP4.ROUTE[2]: dst = 192.168.1.0/24, nh = 0.0.0.0, mt = 100 IP4.ROUTE[3]: dst = XXX.XXX.0.0/16, nh = 0.0.0.0, mt = 1000 IP4.DNS[1]: 8.8.8.8 IP4.DNS[2]: 8.8.4.4
$ systemctl status resolvconf
● resolvconf.service - Nameserver information manager Loaded: loaded (/lib/systemd/system/resolvconf.service; enabled; vendor preset: enabled) Active: active (exited) since Tue 2019-08-06 10:09:40 CEST; 6min ago
$ systemctl status NetworkManager
● NetworkManager.service - Network Manager Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2019-08-06 10:10:20 CEST; 5min ago ... Aug 06 10:10:31 xxxx NetworkManager[1136]: <info> [1565079031.8637] device (eth0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed') Aug 06 10:10:31 xxxx NetworkManager[1136]: <info> [1565079031.8640] device (eth0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed') Aug 06 10:10:31 xxxx NetworkManager[1136]: <info> [1565079031.8646] manager: NetworkManager state is now CONNECTED_LOCAL Aug 06 10:10:32 xxxx dhclient[1397]: bound to 192.168.1.8 -- renewal in 37516 seconds. Aug 06 10:10:32 xxxx NetworkManager[1136]: <info> [1565079032.2838] manager: NetworkManager state is now CONNECTED_SITE Aug 06 10:10:32 xxxx NetworkManager[1136]: <info> [1565079032.2840] policy: set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS Aug 06 10:10:32 xxxx NetworkManager[1136]: <info> [1565079032.2844] device (eth0): Activation: successful, device activated. Aug 06 10:10:32 xxxx NetworkManager[1136]: <info> [1565079032.2851] manager: NetworkManager state is now CONNECTED_GLOBAL Aug 06 10:10:32 xxxx NetworkManager[1136]: <info> [1565079032.2856] manager: startup complete Aug 06 10:12:14 xxxx NetworkManager[1136]: <info> [1565079134.0454] agent-manager: req[0x56068d7b9090, :1.89/org.freedesktop.nm-applet/1000]: agent registered
My netplan config directory is empty:
$ ls /etc/netplan -a
. ..
I don't know whether
/etc/network/interfaces
is still being used:$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback # auto eth0 # iface eth0 inet dhcp
Do you have any suggestions on how I could troubleshoot this issue? I would like the DNS to work without having to disconnect and reconnect the ethernet connection after every boot. Thanks!
Edit #1
$ ls -al /etc/resolv.conf
lrwxrwxrwx 1 root root 29 Jun 30 2015 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
Edit #2
These are the contents of
/etc/resolv.conf
immediately after boot:$ 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.
These are the contents of
/etc/resolv.conf
after disconnecting and re-connecting ethernet connection:# 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
-
chili555 almost 5 yearsPlease edit your question to show the result of the terminal command:
ls -al /etc/resolv.conf
-
Mark Northrop almost 5 years@chili555 Thank you for your response. I've added the result of ls -al /etc/resolv.conf
-
Elias almost 5 yearsPossibly related: askubuntu.com/q/1163183/874649
-
Mark Northrop almost 5 years@Elias Thanks for your comment. It appears there might be some similarity. I've updated my question with the contents of /etc/resolv.conf.
-
-
Mark Northrop almost 5 yearsI'll try this. I've edited my question with the results of cat /etc/resolv.conf immediately after boot, and also after I've disconnected and re-connected the ethernet connection. Would you still suggest removing /etc/resolv.conf and linking it to /run/systemd/resolve/stub-resolv.conf instead?
-
chili555 almost 5 yearsYes, please do so.
-
Mark Northrop almost 5 yearsFollowing these instructions solved the problem. The DNS is now working without issue from boot. @chili555 Thanks for your help!