postgres: client could not connect to server

1

For clarification, please note that I have found several similar questions on stackoverflow, but I could not fix my issue.

psql: could not connect to server: Connection refused” Error when connecting to remote database

psql: How to Allow Remote Access to PostgreSQL database

I am trying to connect to a postgres DB installed in a remote server. To create a connection from the client I am using QGIS plugin (Add PostGIS Layer):

enter image description here

The error that occurs is:

could not connect to server: Connection refused (0x0000274D/10061) is the server running on host "localhost" (::1) and accepting TCP/IP connection on port 5432

Additionally I added the host's IP Adress in the Host field, but then another error message occurs:

could not connect to server: Connection timed out (0x0000274C/10060) Is the server running on host "hosts_ip_adress" and accepting TCP/IP connections on port 5432?

My settings are:

  1. Postgres installed version is 10.0 with PostGIS extension
  2. Host operating System: Windows 7
  3. Client operating System: Windows 7

I edited pg_hba.conf to:

host    all             all             0.0.0.0/0               md5

and changes listen parameter in 'postgresql.conf' to:

listen_addresses = '*'

both files are located in C:\Program Files\PostgreSQL\10\data

  1. restartet pgAdmin4

My devices are in the same network. Each one is connected via LAN cable. I suppose that a firewall is preventing the connection?

windows
postgresql
postgis
qgis
asked on Stack Overflow May 4, 2018 by Candy

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0