LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-13-2023, 02:16 AM   #1
bomberb17
Member
 
Registered: Jul 2005
Posts: 71

Rep: Reputation: 0
Temporary failure in name resolution on ubuntu server 22.04


For some reason my RPi running ubuntu server 22.04 stopped resolving names.
e.g.
Code:
$ ping google.com
ping: google.com: Temporary failure in name resolution
Also:
Code:
$ resolvectl status
Global
       Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub
     DNS Servers: 8.8.8.8 1.1.1.1

Link 2 (eth0)
Current Scopes: none
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

Link 3 (wlan0)
Current Scopes: DNS
     Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
   DNS Servers: 8.8.8.8 8.8.4.4 192.168.1.1

Link 4 (wg0)
Current Scopes: none
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
everything seems to be ok here..

Code:
$ cat /etc/resolv.conf
# This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad
search .
But if I change the nameserver here the file is reset back to these values.

Code:
network:
    ethernets:
        eth0:
            dhcp4: true
            optional: true
    version: 2

    wifis:
        wlan0:
            link-local: [ ipv4 ]
            optional: true
            access-points:
                "ssid-name":
                    password: "password"
            dhcp4: true
            nameservers:
                addresses: [8.8.8.8, 8.8.4.4]
Code:
$ nslookup ubuntu.com
;; communications error to 127.0.0.53#53: timed out
;; communications error to 127.0.0.53#53: timed out
;; communications error to 127.0.0.53#53: timed out
;; no servers could be reached
I also tried
Code:
mv /etc/resolv.conf /etc/resolv.conf.bak
and:

Code:
$ nslookup ubuntu.com
;; UDP setup with ::1#53(::1) for ubuntu.com failed: address not available.
;; UDP setup with ::1#53(::1) for ubuntu.com failed: address not available.
;; UDP setup with ::1#53(::1) for ubuntu.com failed: address not available.
;; communications error to 127.0.0.1#53: connection refused
;; no servers could be reached
I also tried to open 43/tcp and 53/udp with ufw but that didn't help..

What else can I do?

Last edited by bomberb17; 08-13-2023 at 02:56 AM.
 
Old 08-13-2023, 03:14 AM   #2
bomberb17
Member
 
Registered: Jul 2005
Posts: 71

Original Poster
Rep: Reputation: 0
Hmm... resolved by creating a new resolv.conf file that is not symlinked.. Wonder why this symlink created problems, and why this needs to be a symlink in the first place..
Is it possible that my configuration will be broken again in future updates?
 
Old 08-14-2023, 08:17 PM   #3
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,860

Rep: Reputation: 161Reputation: 161
Based on the output of nslookup ubuntu.com, the 'nameserver' IP address need to be changed to valid one in resolv.conf.
 
Old 08-14-2023, 08:48 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,813

Rep: Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958
https://wiki.archlinux.org/title/systemd-resolved

If you did not change any configuration settings the next time the system is booted/restarted the symlink will be recreated. Did you make any configuration changes or update the Pi recently that might correlate with DNS not working?
Did you add Google's DNS servers manually? If so where? Network Manager?
 
  


Reply

Tags
dns, resolution



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Unable to Ping Hosts by Domain Name - Temporary failure in name resolution LearningSponge Linux - Networking 8 03-01-2023 11:38 AM
Telnet : Temporary failure in name resolution : Host name lookup failure koodoo Linux - Newbie 10 02-11-2008 07:59 PM
Temporary Failure in Name Resolution ewto Linux - General 2 07-15-2005 01:28 PM
"getaddrinfo failed: Temporary failure in name resolution" SammyK Linux - Networking 3 03-09-2005 11:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration