flyctl proxy fails

Hi,

I’ve been working fine for a few days with a postgresql database deployed in fly.io, from a local node.js project, but today after updating the flyctl version I can’t connect from my laptop.

I use the command flyctl proxy 5432 -a <my_app>, but now I get an error:
Error listen tcp 127.0.0.1:5432: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

flyctl status it’s ok.
flyctl doctor it’s ok.
flyctl postgres connect it’s ok.

So I don’t know what to do now.
I have tried to install the previous version with $v="0.0.409"; iwr https://fly.io/install.ps1 -useb | iex but I have the same problem.

is there another way to connect to postgresql from node, using public_ip:port?
I’ve added an IP with flyctl ips allocate-v4 and changed the string connection from localhost to that IP, but doesn’t work.

Thanks

I am trying to connect directly with WireGuard.

I have created a configuration with
fly wireguard create
and managed to open the tunnel.

I modified the connection string to
postgres://postgres:<pass>@<app_name>.internal:5432
but it does not work

How do I know which host and port to use?

Thanks

Thanks for reaching out on this, we are seeing now that fly proxy on latest flyctl has some issues and we will investigate.

Your port should be correct, I think the only thing missing might be the db name (which is most likely postgres too): postgres://postgres:<pass>@<app_name>.internal:5432/postgres. Can you share what error message you got?

Should be fixed now on fly v0.0.411. Feel free to fly version update now.

1 Like

updated, and it’s working now.

Thanks

1 Like

my team got error again on v0.0.485