I have configured my PostgreSQL server to listen on all addresses and set a port forwarding rule.
I know this has worked as a colleague who works remote can access it fine. I also accessed it remotely myself.
However, when attempting to demonstrate to a client on their network, QGIS was unable to connect. It asked if the server was on and accepting connections on the port. I don't understand why it wouldn't work.
They have said it is not their firewall (as this was my first thought).
Is there anything obvious it could be?
1 Answer 1
I think first you would edit the postgres log file to see if you have any messages related to the server that is trying to connect to the database. Shortly after you check the parameters to be changed for access to the database.
In the postgresql.conf
file you change the parameter
listen_addresses = '*' # what IP address (es) to listen on;
Examples:
In pg_hba.conf
you release the IP
# TYPE DATABASE USER ADDRESS METHOD
host all all 192.168.23.43/32 md5 # Only frees a specific ip
host all all 192.168.0.0/16 md5 # Free the entire network 192.168
host all all 192.168.45.0/24 md5 # Frees the entire network 192.168.45
-
Hi Wellington, thank you for this suggestion. In the log I am seeing LOG: could not receive data from client: An existing connection was forcibly closed by the remote host. But no indication of a specific IPJamie Clarkson– Jamie Clarkson2019年04月02日 13:07:32 +00:00Commented Apr 2, 2019 at 13:07
psql
and see what errors you get, if any (or justtelnet
to Postgres' IP address at the specific port, to see if it is accessible from that network). Perhaps it's the connection settings in QGIS.