Home > Blockchain >  Cannot connect to db server to specified port
Cannot connect to db server to specified port

Time:11-28

I am trying to set up db using docker. However I am facing the following issue that my port is not accepting following connections to this port. I've ran docker-compose up, all worked fine. Now I just can't connect to the server using pgAdmin.

Screenshot of error below:

Image

Code src: https://github.com/khezen/compose-postgres

CodePudding user response:

It's because your IP address is resolved in pgadmin service and localhost(127.0.0.1) resolved in pgadmin container, not in the host machine.

You should add a public or machine IP address or if both pgadmin and postgres service in the same network add the hostname of postgres service.

  • Related