PDA

View Full Version : Postgre service doesn't start after editing pg_hba.conf



hypertyper
08-30-2010, 07:39 AM
I've followed the guide to allowing network access to my database but whenever I change the pg_hba.conf file to allow network access the Postgre Service doesn't start. I've configured the listening ip and password and I've tried different levels of access but nothing seems to work. I use pgadmin as instructed in the FAQ.

When I delete the line in the conf file so it's back to its original state I can start the service.

Any ideas what postgre might not like? I've disabled the Win firewall. That's all I could think of.

Cheers

Patvs
08-31-2010, 02:03 AM
Which SQL version? The "special" installer from PostgreSQL: The world's most advanced open source database (http://www.postgresql.org?)

Postgres might not like:
your firewall
your anti virus program
Windows Defender
your anti virus' firewall
your router's firewall
your Windows USER ACCOUNT CONTROL SETTINGS
etc

hypertyper
08-31-2010, 05:09 AM
It's version 8.4 from the combo installer on a Win7 PC.

The point is that it works fine until I try to allow outside access. It doesn't even start rather than not allowing a connection. I'll try to disable everything on your list and I hope it works but I doubt it. I'll report back later.

netsrak
08-31-2010, 08:35 AM
If the service doesn't start after you changed the config file there is an error in this file. You should restore the original version, read the comments in the file and try again.

hypertyper
08-31-2010, 08:49 AM
host all all 192.168.1.71/32 trust

I've now put this line in and the service at least starts. When I used pgAdmin to add a rule it didn't put the /32 at the end of the ip address. I have no idea what it does but now, surprise surprise, the service starts and I can actually use the database on my laptop.

Either the pgadmin tool doesn't work properly or my PC is a retard.