0

I am having trouble connecting with pgAdmin4 to a PostgreSQL database (version 9.5) running on Ubuntu 16.04. The connection times out when I attempt to connect. I think it is being refused/dropped at some point but am not sure where.

Here are the postgres config files

pg_hba.conf

postgresql.conf

The result of running netstat -tulpen:

netstat -tulpen

The result of running service postgresql status:

service postgresql status

result of running ufw status:

ufw status

Error message from PgAdmin:

connection error (pgAdmin)

Attempting to connect with telnet also failed, returning the following message:

Could not open a connection to the host, on port 5432: Connect failed

Thanks in advance for any suggestions.

0

1 Answer 1

0

This Problem has been solved.

The Issue was related to a firewall layer external to the VM running the database. The external firewall was not set to allow TCP/IP connections over port 5432, but it was possible to connect via port 3306.

As I did not have access/permissions to the external firewall rules, I changed the port and have been using 3306 since. I have had no issues with this. I have also started using an ssh tunnel for connecting from outside the network.

This is the changes to the postgresql.conf file required:

postgresql.conf

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .