Sample Header Ad - 728x90

Postgresql refuses connect from Windows psql

0 votes
0 answers
195 views
I've been fiddling with these for 3 hours now and I can't figure out why my PostgreSQL server on a Debian server accepts connections from my Ubuntu server but not from my Windows 10 or 11 machines. When I run psql -h dbserver -U dbmanage postgres the log indicates: **/var/log/postgresql/postgresql-15-main.log**
2024-01-01 09:02:00.358 UTC  dbmanage@postgres FATAL:  no pg_hba.conf entry for host "2001:5a8:4453:7900:b851:cdf3:6995:1d7e", user "dbmanage", database "postgres", SSL encryption
2024-01-01 09:02:00.358 UTC  dbmanage@postgres DETAIL:  Could not resolve client IP address to a host name: Name or service not known.
2024-01-01 09:02:00.382 UTC  dbmanage@postgres FATAL:  no pg_hba.conf entry for host "2001:5a8:4453:7900:b851:cdf3:6995:1d7e", user "dbmanage", database "postgres", no encryption
2024-01-01 09:02:00.382 UTC  dbmanage@postgres DETAIL:  Could not resolve client IP address to a host name: Name or service not known.
The PostgreSQL config is set properly. I created the user with PASSWORD (MD5) **pg_hba.conf**
# Database administrative login by Unix domain socket
local   all             postgres                                peer

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            scram-sha-256
# IPv6 local connections:
host    all             all             ::1/128                 scram-sha-256
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     peer
host    replication     all             127.0.0.1/32            scram-sha-256
host    replication     all             ::1/128                 scram-sha-256
# Configurations added after installation
#host   all             dbmanage         192.168.4.0/24          scram-sha-256
host    all             dbmanage         192.168.4.0/24          md5
host    all             all             localhost               scram-sha-256
This is really weird. The whole point was to use pgAdmin on my Windows machine, and it is refusing to connect, so I check to see if psql will connect, and discover that there is a problem with Windoze connecting to my postgres? **Update** Found a solution here
Asked by Ken Ingram (181 rep)
Jan 1, 2024, 09:21 AM
Last activity: Jan 1, 2024, 10:39 AM