Skip to content
← All posts

·

Neon database not connecting on Jio Wi-Fi? It's your DNS

Why getaddrinfo ENOTFOUND appears for Neon Postgres on some Indian home networks, how to confirm the cause in one command, and the fix.

You create a fresh Neon project, paste the connection string into .env.local, run your migration, and it hangs. Run a plain connection test and you get this instead:

getaddrinfo ENOTFOUND ep-something-pooler.c-3.ap-southeast-1.aws.neon.tech

Your code is fine and so is Neon. Your laptop simply can't turn the database's hostname into an IP address.

What is actually happening

Before connecting to anything by name, your computer asks a DNS server for its address. On many home networks that DNS server is the router, which forwards questions to your internet provider.

I hit this on a Jio connection while building Launchfast. Asking the router directly showed the problem clearly:

dig @192.168.29.1 c-3.ap-southeast-1.aws.neon.tech
;; ->>HEADER<<- opcode: QUERY, status: REFUSED

The router refused to answer for Neon's hostnames. Asking a public resolver for the same name worked straight away:

dig +short @1.1.1.1 c-3.ap-southeast-1.aws.neon.tech
52.76.128.157
13.251.213.89

So the database is reachable. Only the lookup is failing.

Confirm it on your machine

Run both lookups. Replace the router address with yours (often 192.168.29.1 on Jio, or 192.168.1.1):

dig @192.168.29.1 your-endpoint.aws.neon.tech
dig @1.1.1.1 your-endpoint.aws.neon.tech

If the first returns REFUSED or nothing and the second returns IP addresses, DNS is your problem.

The fix

Point your computer (not the router) at a public DNS resolver. Your internet traffic still goes through your provider as before; only name lookups change.

Linux with NetworkManager:

nmcli connection modify "YOUR WIFI NAME" ipv4.dns "1.1.1.1 8.8.8.8" ipv4.ignore-auto-dns yes \
  ipv6.dns "2606:4700:4700::1111 2001:4860:4860::8888" ipv6.ignore-auto-dns yes
nmcli connection up "YOUR WIFI NAME"

macOS: System Settings → Wi-Fi → Details → DNS, then add 1.1.1.1 and 8.8.8.8.

Windows: Settings → Network & internet → your connection → DNS server assignment → Edit, then set 1.1.1.1 and 8.8.8.8.

Run your migration again and it should connect immediately.

Does this affect production?

No. Your deployed app runs on your host's servers (Vercel, for example), which use their own DNS. This only breaks local development on networks whose DNS refuses these names.