Server - pg_hba.conf Issues

Post Reply
wandering_dude
Posts: 3
Joined: 09 Jun 18 18:30

Server - pg_hba.conf Issues

Post by wandering_dude » 09 Jun 18 19:22

My wife and I need to share photos on our MacBooks. Trying PS using PostGreSQL on Windows. PostgreSQL installed fine as did Photo Supreme on the Windows box. But I cannot connect to the server from my Mac. I get the error
>> Connection to database failed (PostgreSQL : FATAL : No pg_hba.conf entry for host "192.168.1.126", user "Idimager_main", database "photosupreme", SSL off <<

Details:
PostgreSQL 10.4 on Windows 7 Home Premium
Connecting from Macbook Air running MacOS 10.13.4
Using port 5432 - port is open and accessible from the Mac
pg_hba.conf file modified per instructions and system rebooted. file contains lines:
host replication all 127.0.0.1/32 md5
host replication all ::1/128 md5

I have also tried the following:
host replication all 192.168.1.126/32 md5
and:
host replication all samenet md5

I have verified there is only one pg_hba.conf file on the Windows box, and PostgreSQL is pointed to it.

One other thing to note: when logging in on the Mac I tried using the default "admin" user, as well as setting up a new user with admin rights on the server and entering those credentials.

Any ideas?

Hert
Posts: 21052
Joined: 13 Sep 03 7:24

Re: Server - pg_hba.conf Issues

Post by Hert » 11 Jun 18 0:35

First thing is always to check that your firewall allows incoming TCP/IP connections on the Postgresql port.
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

wandering_dude
Posts: 3
Joined: 09 Jun 18 18:30

Re: Server - pg_hba.conf Issues

Post by wandering_dude » 13 Jun 18 2:07

The firewall is open on the correct port. Still getting the same error message.

Hert
Posts: 21052
Joined: 13 Sep 03 7:24

Re: Server - pg_hba.conf Issues

Post by Hert » 13 Jun 18 2:44

wandering_dude wrote:
09 Jun 18 19:22
pg_hba.conf file modified per instructions and system rebooted. file contains lines:
host replication all 127.0.0.1/32 md5
host replication all ::1/128 md5
Maybe you can share your full config file? You mention replication, but PSU doesn’t use replication. It’s all about the line
host all all 127.0.0.1/0 md5
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

wandering_dude
Posts: 3
Joined: 09 Jun 18 18:30

Re: Server - pg_hba.conf Issues

Post by wandering_dude » 13 Jun 18 15:23

So "replication" was the issue. I had tried a entering the IP address directly into the conf file, but had used "replication" instead of "all". I changed that and it is working now.

Thank you.

Post Reply