Trouble Connecting to Postgres Cluster

Hello! When I try using fly proxy 5432 -a [app-name] to connect to my Postgres cluster, I get the following error -

Error: [app name].internal: host was not found in DNS

Any suggestions for what I should do? Thank you!

EDIT - For clarification, I used fly postgres create to create it.

Are you in the LAX (Los Angeles) region, by any chance?

Another user there is reporting this same glitch recently…

No I’m using SJC. I tried again just now and it gave me a new error first - Error: tunnel unavailable for organization personal: failed probing "personal": context deadline exceeded. Then it went back to what it had before. Is this feature simply unavailable for personal accounts?

No, I use fly proxy all the time and also only have the Hobby plan.

(I’m 99% sure that the personal up there is meant solely as a disambiguating organization ID—and not as a billing class.)

As a temporary workaround, it is always possible to bypass DNS and provide a numeric IP on the fly proxy command line:

fly m list -a <db-app-name>  # consult the IP ADDRESS column
fly proxy 5432 fdaa:<hex-digits-from-above>:2
1 Like

This sort of works, but honestly I’m having a lot of trouble connecting to it in other ways too. I’m not sure what’s wrong, as I’ve thoroughly read through the documentation and followed the instructions strictly.

For example, after following the directions here to allow external connections and trying something like…

psql "sslmode=require host=<app name>.fly.dev dbname=<name> user=postgres"

… I get this error - psql: error: could not translate host name "<app name>.fly.dev" to address: nodename nor servname provided, or not known. I thought maybe, something’s wrong with the services or the IPv6 address? Everything seems to be alright.

PROTOCOL	PORTS       	HANDLERS	FORCE HTTPS	PROCESS GROUP	REGIONS	MACHINES
TCP     	5432 => 5432	[PG_TLS]	False      	             	sjc    	1       	
TCP     	5433 => 5433	[PG_TLS]	False
VERSION   	IP                  	TYPE   	REGION	CREATED AT
v6        	<ip address>	        public 	global	15h39m ago          	
private_v6	<ip address>  	        private	global	2023-11-08T19:02:56Z

Using the connection string postgres://postgres:<password>@<app name>.fly.dev:5432/<db name> gives a similar error. Really not sure what to do here :sweat_smile:

1 Like

Does your ISP support IPv6? You can test it here. Try adding an IPv4 address to your app to see if that fixes your issue.

Yes that was the problem. I was on my university’s network and apparently they don’t support IPv6… didn’t even come to my mind! Thank you very much for clearing this up :slightly_smiling_face:

1 Like

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