Skip to content

Instantly share code, notes, and snippets.

@DaWe35
Last active February 2, 2025 22:07
Show Gist options
  • Save DaWe35/58f7019196b92a689e2d18f9f304f9d7 to your computer and use it in GitHub Desktop.
Save DaWe35/58f7019196b92a689e2d18f9f304f9d7 to your computer and use it in GitHub Desktop.

Source: https://www.thomasmartens.eu/contabo-dns-lookup-timeouts/

I got a ton of getaddrinfo EAI_AGAIN (alpine) and getaddrinfo ENOTFOUND (debian) errors in my nodejs app, running in docker. Also sometimes curl fails with curl: (6) Could not resolve host: ...

Turns out contabo DNS servers are unreliable.

  1. Check default DNS servers: resolvectl status | grep 'DNS Servers' -A2 or cat /etc/resolv.conf

  2. Change DNS servers: nano /etc/netplan/01-netcfg.yaml. Comment out the problematic ones under network > ethernets > ens18 > nameservers > addresses and add working IPs instead such as the ones provided by Quad9 (9.9.9.9) or Google (8.8.8.8, 8.8.4.4).

  3. Apply changes: sudo netplan apply

  4. Test if everything works (run 1. again)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment