Re: V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf' - Mailing list pgsql-general
From | Alan Deane |
---|---|
Subject | Re: V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf' |
Date | |
Msg-id | 8303448851274168881C4B9228F62A66@tinhare Whole thread Raw |
In response to | Re: V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf' (Chris <dmagick@gmail.com>) |
Responses |
Re: V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf'
Re: V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf' |
List | pgsql-general |
Hi Chris, Thanks for your reply. Maybe I should have reworded it slightly better or fuller. I assumed that having ConfigDir/pg_hba.conf line in postgresql.conf would look for the hba file in the directory relative to where postgres is installed. I.e. the data directory and given that the service when it starts uses g:/Program Files/PostgreSQL/8.3/bin/pg_ctl.exe runservice -N "postgresql-8.3" -D "G:/Program Files/PostgreSQL/8.3/data" -w and from what I've read the -D switch is basically telling postgres where to find the conf files and setting the relative path for ConfigDir, so I was surprised that it looked for the hba conf in the system32 directory. I agree I could supply the full path to the file in postgresql.conf and it will probably work. However, it doesn't help my understand why it didn't pick it up using the relative path. As for the networking side of things. I have opened port 5432 on my firewall and I also disabled the firewall (Kaspersky btw not Windows it is disabled permanently). My pg_hba.conf file reads. # IPv4 local connections: host all all 127.0.0.1/32 md5 host all all 192.168.2.0/16 trust I have only set it to trust for testing purposes as soon as I get a connect it will be going back to md5. Thanks for taking the time to look at this. It's really appreciated. Cheers, Alan. -----Original Message----- From: Chris [mailto:dmagick@gmail.com] Sent: 30 July 2009 00:37 To: alan@anitltd.co.uk Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf' Alan Deane wrote: > Hi All, > > I was wondering if anyone has had this problem and knows an answer. This > is the first time I have used postgres so I am at a loss after trying > many things as to how to solve the problem. > > > > I've unremmed the line hba_file = 'ConfigDir/pg_hba.conf' in the > postgresql.conf file as I want to be able to connect to the data base > from another machine on my LAN. > I have also added the IP range into the pg_hba.conf file. > > Now I get a Windows Services error saying the server started and stopped > and no access on the local machine, unsurprisingly. > > Having a look at the event viewer showed the following error. > > %t FATAL: could not open configuration file > "C:/WINDOWS/system32/ConfigDir/pg_hba.conf": No such file or directory > > Hmm, that's interesting, why would it be looking there and not in the > data folder where pg_hba.conf resides? Because you've supplied a relative path. You can supply a full path: G:/Program Files/PostgreSQL/8.3/data/pg_hba.conf or leave it commented out for it to look in the data/ folder you specify already. > Also despite enabling the network IP addresses in pg_hba.conf I still > can't connect to the database from a remote machine. Although I'd like > to solve the system32 problem first before I start worrying about > network connections. Can you post the uncommented parts of pg_hba.conf and what ip you are trying to connect from? Also what's the error? and lastly - have you opened port 5432 in your firewall? -- Postgresql & php tutorials http://www.designmagick.com/
pgsql-general by date: