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.


i have same issue when using proxy and using postgres flex

➜  fly proxy 15432:5432 -a summerdb
Error summerdb.internal: host was not found in DNS

I have the same issues for all newly created apps. None of them show up in result of running from my laptop with wireguard connected

dig +short _apps.internal txt

It does return correct result running from inside any app.

Hi @duytbp, from your laptop, try specifying the DNS server according to this doc Private Networking · Fly Docs

Hi @catflydotio, I verified that correct DNS is being used.

~ cat /etc/resolv.conf
nameserver [same address with DNS from wireguard config]

~ dig +short _apps.internal txt @[dns-ip-from-wireguard-config]
[ different result from dig inside any app ]

The new apps that are having problems named capybara & otto :smiley: