Quantcast
Channel: Active questions tagged 22.04 - Ask Ubuntu
Viewing all articles
Browse latest Browse all 4417

Name resolution (hostname) doesn't work /Ubuntu 22.04 server

$
0
0

I cannot ping or mount using hostname of server on domain network.

Server is almost fresh install, just using apache, mysql, php for webhosting.

If I ping server with its hostname it result with this error:

Temporary failure in name resolution

Pinging ip address works.

If I try to mount server with hostname:

mount error: could not resolve address for server_name: Unknown error

If I tried to ping FQDN of server, it also resulted with same error

ping server_name.domain_name.localTemporary failure in name resolution

After I changed symlink from

resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

to

resolv.conf -> /run/systemd/resolve/resolv.conf

using

sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

with help from answer here Ubuntu 18.04 .local domain dns lookup not working

The real issue is that Ubuntu 18.04 has its resolv.conf sym-linked toa stub file that points to the localhost for name resolution.Localhost DNS name resolution means that the system refuses to checkthe supplied DNS server for .local names, believing (incorrectly) thatsuch names are invalid.

I can now ping FQDN, but pinging hostname still doesn't work.

I can see now that system is using correct DNS server (not that default localhost ip):

resolvectl statusGlobal       Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupportedresolv.conf mode: uplinkLink 2 (eth0)    Current Scopes: DNS         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupportedCurrent DNS Server: ip_of_my_dns_server_on_lan       DNS Servers: ip_of_my_dns_server_on_lan

What to do to be able ping hostname? (and mount using hostname etc.)


Viewing all articles
Browse latest Browse all 4417

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>