Opens in a new tab

“Temporary failure in name resolution” (EAI_AGAIN)

The system could not get any answer from DNS. On Linux it means one of two things: the machine cannot reach a DNS server at all — the usual case on servers and containers — or the resolver reached DNS and got a server failure for the domain. Looking the name up from elsewhere tells you which.

ping: example.com: Temporary failure in name resolution
How 4 other clients word the same error

Python

socket.gaierror: [Errno -3] Temporary failure in name resolution

Node.js

Error: getaddrinfo EAI_AGAIN example.com

Windows

[Errno 11002] getaddrinfo failed · This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.

FreeBSD

Name could not be resolved at this time
ErrorTemporary failure in name resolution
Usually fixed byEither side
CodeEAI_AGAIN (glibc -3); WSATRY_AGAIN 11002 on Windows
MeansNo DNS server answered, or one answered SERVFAIL

Look up the domain’s DNS

Look the name up from outside: if it resolves here, the machine that failed cannot reach DNS; if it fails here too, the domain is the problem.

What it means

glibc — the resolver library behind most Linux programs — reports EAI_AGAIN, “Temporary failure in name resolution”, when a query could not be answered: no DNS server responded, the connection was refused, or the server returned SERVFAIL. Python, Node, curl and ping all pass that message on.

Why it happens

  • No working DNS server configured: an empty or wrong /etc/resolv.conf, systemd-resolved stopped, or a container without DNS settings.
  • No network, or a firewall blocking outgoing DNS on port 53.
  • The domain’s own DNS failing — every lookup of it returns SERVFAIL (see SERVFAIL).

How to fix it

  1. Look the name up with the check above. If it works here, the problem is the failing machine’s DNS.
  2. On that machine, check which server it uses (resolvectl status, or /etc/resolv.conf) and query it directly: dig example.com @that-server.
  3. Point it at a working resolver, allow UDP and TCP 53 out, and restart the resolver service.
  4. If the name fails everywhere, follow the SERVFAIL page — the domain’s DNS is at fault.

See it for yourself

resolvectl status
dig example.com
dig example.com @1.1.1.1

If the lookup through 1.1.1.1 works and the default one does not, the machine’s DNS settings are the problem.

Sources

Error text and meaning checked on 25 September 2026 against these official sources:

Know the moment your domain stops resolving

Add your domain and we check its DNS on a schedule — nameservers, DNSSEC, records and registration — and email you when something breaks or changes. Free for your first domain.

Create a free account