I am trying to connect Geoserver (installed in a VPS) to a PostgreSql database wich is running into my pc(localhost). I have follow the steps to allow this kind of connection(I do not know if all needed):
POSTGRESQL:
1.- Edit pg_hba.config of PostgreSql to allow Ip of VPS(Geoserver):
host all all ip_VPS/24 md5
2.- Edit postgresql.conf to allow remote connections:
listen_addresses ='*'
WINDOWS:
1.- Firewall configuration to allow Ip(VPS) access.
,but i still getting this connection error:
Unable to obtain connection: Cannot create PoolableConnectionFactory (Connection to My_Ip(pc):5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.).
Would i have to make other configuration ?.
Thanks in advance.
0k. You have in pg_hba.config:
host all all ip_VPS/24 md5
Maybe you should try this:
host all all ip_VPS/24 trust
Then you should restart postgres.
(For the parameter "trust" or "md5" I recommend reviewing:
www.postgresql.org/docs/9.5/static/auth-pg-hba-conf.html)
Greetings.