Xojo Cloud Remote database : Address already in use

I try to connect to y Postgres database from my computer with pgAdmin 4.

I follow this on the documentation to create a tunnel
https://documentation.xojo.com/topics/xojo_cloud/the_xojo_cloud_control_panel.html#topics-xojo-cloud-the-xojo-cloud-control-panel-setting-up-a-tunnel

When I run the command on the terminal I have the following message:

bind [127.0.0.1]:5432: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 5432
Could not request local forwarding

In the past I already make test with another Xojo cloud server. May be this is where came the issue…

In pgAdmin I got this message:

I also don’t know what to put on the connection tab of pgAdmin

If you happen to be running a postgresql server locally or pgadmin is already using it, yes, that port will already be in use. You can change the local port by changing the first number like this:

ssh -L 54321:localhost:5432 dbadmin@ipaddress -N

And then in pgadmin, use 54321 instead of 5432.

Edit: fixed the port order

Thank you @Greg_O

When I try your solution. I will prompt to enter password. After pressing enter nothing appear. Like an infinity loop. I had to press Ctrl/C to stop the command.




ip Xojo cloud is replaced by my XojoCloud server IP

When entering that command, the password is the one that the Xojo cloud control panel gave you when you set up the tunnel.

In pgadmin, the username and password should match what you got when enabling Postgres.

I receive a message from Xojo Support From @Jason_Parsley

This is the solution:

To connect with pgAdmin, I would not set up the tunnel in the terminal. pgAdmin will do that for you so I would make sure that the terminal tunnel isn’t open.

The next thing that I would do is deploy a simple test web app to your server from the Xojo IDE. Doing that will add your external ip address to an allow list - if your ip isn’t on the last, the security system will likely block pgAdmin.

On the SSH Tunnel tab in pgAdmin, the Tunnel host should then be xxx.xx.xx.xxx. (replace with your own XojoCloud IP)

On the Connection tab you can use localhost for the Host name/address.

Thanks to @Jason_Parsley :+1:

1 Like