Postgres connection issue: host was not found in DNS

Hi everyone. Just today I am no longer able to connect to my database, via TablePlus and Wireguard. I thought it was an issue with expired key so I went ahead and generated a new wireguard key but having the same issue. The error that was given by TablePlus reads:

could not translate host name "club-db.internal" to address: nodename nor servname provided, or not known

When trying to proxy via fly proxy localhost -a club-db, it returns Error club-db.internal: host was not found in DNS

Fortunately, the app that connects to this database is still working fine. I’m certainly worried that that will break too at some point and I’m left with a database that I can’t connect to.

Thanks for the help in advance!

What DNS server are you using to resolve the .internal address? It’s only possible to do so using our private DNS server hosted at [fdaa::3]:53 which is only available when connected via WireGuard or from an app hosted on us.

For example:

dig @fdaa::3 AAAA club-db.internal

You also have to be connected using a peer on the same private network (usually that means in the same organization).

@jerome I don’t think I’m doing anything different as of recent. I’m using a wireguard client with a config that was setup a year+ ago. Here’s what dig tells me:

~:~$ dig @fdaa::3 AAAA club-db.internal

; <<>> DiG 9.10.6 <<>> @fdaa::3 AAAA club-db.internal
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

Sorry, that was the wrong server address for a wireguard peer. The actual server address depends on your network ID.

Ok, I tracked this down to something else. There’s a bug sometimes when a host reboots, it might not register the service in our systems when it comes back up.

This should now be fixed.

We also have a fix for this that we’ve rolled out, but that was before the host your app is on rebooted.

Thanks for the speedy response and fix @jerome - I can confirm that I’m able to connect to the database again using both my old and new wireguard config. I looked up the config and was able to get the right network ID and dig now returns success.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.