fly proxy throws app-db.internal: host was not found in DNS

Hi! I tried to connect to a db instance using wireguard, and here’s the steps taken:

  1. activate wireguard
  2. fly proxy 5432 --app app-db
  3. throws an error Error app-db.internal: host was not found in DNS
  4. I can connect to its console via fly ssh console --app app-db

the last deploy (few days ago) was running fine.

If I remember correctly, the proxy command exposes the app on your local host ( Use fly wireguard to use the internal DNS.

1 Like

The proxy and wireguard are two different things. Typically you would choose one or the other.

If using the proxy, you can connect using, but if you have a valid Wireguard VPN connection active, you should be able to use app-db.internal:5432 as the hostname.

I’m still suspicious something is going on with your wireguard config. What happens if you run dig aaaa app-db.internal with wireguard on?

Thanks @fideloper-fly for the tip. What I found was trivial :man_facepalming:, the db instance doesn’t have ip allocated to it which is weird to me. So here’s what I did:

  • Followed this docs in order to get one
  • Restart db instance: fly postgres restart --app app-db

When I created the app + db few months ago, db has ip address linked to it.