Unable to connect to postgresql server running inside a docker container on a remote machine.

Answered

From my local Mac machine, I'm trying to connect to the postgresql server running inside a docker container on a remote machine but I am unable to do so. I see the following error: https://pastebin.com/Qify3Zu5.

Can anyone help?

Thanks

Wasif

0
2 comments

Hi,

You're trying to connect to localhost:

jdbc:postgresql://localhost:58509/postgres 

You need to specify correct endpoint or set up ssh tunnel to remote machine.

Thank you.

 

0

use special HOST to your psql. You could find it in docker-compose.yml 

0

Please sign in to leave a comment.