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
ls -al /etc/resolv.conf