# flyctl proxy fails

**URL:** <https://community.fly.io/t/flyctl-proxy-fails/7818>\
**Category:** Questions / Help\
**Tags:** postgres\
**Created:** [October 12, 2022, 10:26am UTC](https://community.fly.io/t/flyctl-proxy-fails/7818 "2022-10-12T10:26:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DevXP](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@DevXP](https://community.fly.io/u/DevXP)\
**Post date:** [October 12, 2022, 10:26am UTC](https://community.fly.io/t/flyctl-proxy-fails/7818/1 "2022-10-12T10:26:56Z")

</div>

Hi,

I’ve been working fine for a few days with a postgresql database deployed in [fly.io](http://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

---

<div class="post-metadata">

**Author:** ![DevXP](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@DevXP](https://community.fly.io/u/DevXP)\
**Post date:** [October 12, 2022, 11:00am UTC](https://community.fly.io/t/flyctl-proxy-fails/7818/2 "2022-10-12T11:00:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lubien](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/lubien/32/41919_2.png) [@lubien](https://community.fly.io/u/lubien)\
**Post date:** [October 12, 2022, 12:00pm UTC](https://community.fly.io/t/flyctl-proxy-fails/7818/4 "2022-10-12T12:00:39Z")

</div>

> [@DevXP](#):
>
> I’ve been working fine for a few days with a postgresql database deployed in [fly.io](http://fly.io), from a local node.js project, but today after updating the flyctl version I can’t connect from my laptop.

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

> [@DevXP](#):
>
> I modified the connection string to  
> `postgres://postgres:<pass>@<app_name>.internal:5432`  
> but it does not work

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?

---

<div class="post-metadata">

**Author:** ![lubien](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/lubien/32/41919_2.png) [@lubien](https://community.fly.io/u/lubien)\
**Post date:** [October 12, 2022, 1:19pm UTC](https://community.fly.io/t/flyctl-proxy-fails/7818/5 "2022-10-12T13:19:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DevXP](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@DevXP](https://community.fly.io/u/DevXP)\
**Post date:** [October 12, 2022, 9:35pm UTC](https://community.fly.io/t/flyctl-proxy-fails/7818/6 "2022-10-12T21:35:53Z")

</div>

updated, and it’s working now.

Thanks

---

<div class="post-metadata">

**Author:** ![testify](https://avatars.discourse-cdn.com/v4/letter/t/9d8465/32.png) [@testify](https://community.fly.io/u/testify)\
**Post date:** [March 15, 2023, 7:20am UTC](https://community.fly.io/t/flyctl-proxy-fails/7818/7 "2023-03-15T07:20:31Z")

</div>

my team got error again on v0.0.485

 ![image](https://global.discourse-cdn.com/fly1/original/3X/0/0/00185554a8c86f73898c45fcd6bd3ae67d980048.jpeg)
