Score:2

temporary failure in name resolution - resolve.conf points to 8.8.8.8 but still not working

nz flag

I'm connected to the internet, but whenever I ping a website, I just keep getting "Temporary failure in name resolution."

I've already tried the following:

  • changing /etc/resolv.conf to include nameserver 8.8.8.8 and nameserver 8.8.4.4
  • ensuring that there's no symbolic link that's redirecting resolv.conf as per this question
  • running sudo systemctl restart systemd-resolved.service
  • restarting my computer
  • deleting the wireless connection and reconnecting

Output of systemctl status systemd-resolved:

systemd-resolved.service - Network Name Resolution
     Loaded: loaded (/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2023-02-13 09:35:20 EST; 19min ago
       Docs: man:systemd-resolved.service(8)
             man:org.freedesktop.resolve1(5)
             https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
             https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
   Main PID: 799 (systemd-resolve)
     Status: "Processing requests..."
      Tasks: 1 (limit: 6677)
     Memory: 8.3M
        CPU: 169ms
     CGroup: /system.slice/systemd-resolved.service
             └─799 /lib/systemd/systemd-resolved

Feb 13 09:35:20 osprey-ThinkPad-T450 systemd[1]: Started Network Name Resolution.
Feb 13 09:35:31 osprey-ThinkPad-T450 systemd-resolved[799]: wlp3s0: Bus client set search domain list to: adsroot.itcs.<REDACTED>.edu
Feb 13 09:35:31 osprey-ThinkPad-T450 systemd-resolved[799]: wlp3s0: Bus client set default route setting: yes
Feb 13 09:35:31 osprey-ThinkPad-T450 systemd-resolved[799]: wlp3s0: Bus client set DNS server list to: 10.10.10.10, 10.10.5.5
Feb 13 09:40:14 osprey-ThinkPad-T450 systemd-resolved[799]: wlp3s0: Bus client reset search domain list.
Feb 13 09:40:14 osprey-ThinkPad-T450 systemd-resolved[799]: wlp3s0: Bus client set default route setting: no
Feb 13 09:40:14 osprey-ThinkPad-T450 systemd-resolved[799]: wlp3s0: Bus client reset DNS server list.
Feb 13 09:40:14 osprey-ThinkPad-T450 systemd-resolved[799]: wlp3s0: Bus client set search domain list to: adsroot.itcs.<REDACTED>.edu
Feb 13 09:40:14 osprey-ThinkPad-T450 systemd-resolved[799]: wlp3s0: Bus client set default route setting: yes
Feb 13 09:40:14 osprey-ThinkPad-T450 systemd-resolved[799]: wlp3s0: Bus client set DNS server list to: 35.0.0.12, 35.0.0.4`

What else can I try?

I'm running Ubuntu 22.04.1.

Terrance avatar
id flag
Try setting your `/etc/resolv.conf` file to the non-stub version of it. I have had great success with this especially with my router giving out DHCP. `sudo rm /etc/resolv.conf` then `sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf`
ale19 avatar
nz flag
@Terrance Thank you!! That fixed it - I still couldn't connect to the primary network but I was able to limp my way into the guest network and was able to contact my IT department, who gave me a config tool to help me get set up the rest of the way. Feel free to post your comment as an answer and I'll accept it.
ru flag
Have you edited your network configuration for the wireless *after* adding it to statically set your DNS servers to Google DNS? Your logs show that DHCP on the wifi network is overriding your DNS settings, hence your problem - `Feb 13 09:40:14 osprey-ThinkPad-T450 systemd-resolved[799]: wlp3s0: Bus client set DNS server list to: 35.0.0.12, 35.0.0.4`
Score:0
id flag

Try setting your /etc/resolv.conf file to the non-stub version of it. I have had great success with this especially with my router giving out DHCP.

sudo rm /etc/resolv.conf 

sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
Thirumal avatar
br flag
Need to reboot?
Terrance avatar
id flag
@Thirumal You shouldn't have to reboot. Maybe you need to release and renew the DHCP if this doesn't work. See: https://askubuntu.com/a/1024207/231142
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.