What it means
The resolver asked its DNS server and got no answer (or NXDOMAIN). The name may be wrong, the resolver configuration broken, or the DNS server unreachable. /etc/hosts and nsswitch decide what's checked first.
Causes and fixes
Most likely first. Run the check, and if it matches, apply the fix.
1. Broken resolver configuration
Check:
cat /etc/resolv.conf
resolvectl status 2>/dev/null | head -20
Fix: Point it at working nameservers (and a search domain if short names are used).
2. The DNS server is unreachable or doesn't know the name
Check:
dig +short name; dig @1.1.1.1 +short name
Fix: If a public resolver knows it and yours doesn't, fix your resolver or its forwarding.
3. An /etc/hosts entry or nsswitch order overrides DNS
Check:
getent hosts name; grep hosts /etc/nsswitch.conf
Fix: Remove the stale hosts entry.
Fix it yourself
A live machine in your browser with this problem already on it. The grader checks the result.
- Configure the DNS Resolvereasy 4 min
- Pin a Hostname with /etc/hostseasy 3 min
- Test the New Server Before Changing DNSmedium 9 min
No account needed for your first tries.
Related errors
- nslookup: can't resolve 'my-service' / could not resolve host
A Pod can't resolve a Service name, so calls fail before any connection.