Thread: V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf'

V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf'

From
"Alan Deane"
Date:

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?

I then created a ConfigDir in the system32 dir and copied the pg_hba.conf into there. Now the server starts. However, It doesn't ring true to my mind that the file should be located there.

 

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.

This is a brand new install and it has been installed in the default directories, however, on a different drive rather than c:

 

 BTW, the properties of the service read:-

 

g:/Program Files/PostgreSQL/8.3/bin/pg_ctl.exe runservice -N "postgresql-8.3" -D "G:/Program Files/PostgreSQL/8.3/data" -w

Any help appreciated,

Thanks Alan.

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/


Re: V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf'

From
"Alan Deane"
Date:
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/





Alan Deane wrote:
> 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

Must be based off where the service name is, I'm not sure.

> 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.

Yeh, I would have thought it would pick up from the data dir not
somewhere else.

> 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.

and the error when you try to connect is?

Did you restart postgres after changing the pg_hba.conf file?

Seems like it should work.

--
Postgresql & php tutorials
http://www.designmagick.com/


Re-REM (called commenting for us non-windows geeks :-) the line
 
Look in your data directory, the file exists and is used automatically, you don't need to point the postgresql.conf file to it explicitly.

Look at:
http://www.postgresql.org/docs/8.3/interactive/client-authentication.html

  For details on configuring the file.

Good Luck

--Scott

Re: V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf'

From
"Alan Deane"
Date:

Ah, OK.

 

So what you are saying is that I don’t need the 'ConfigDir/pg_hba.conf'   in postgresql.conf . I guess that makes sense as well because you would only need that if it wasn’t located in the data directory.

 

Although having said that, I think I uncommented it because I was having trouble seeing the changes to the IP addresses in pgAdmin. But that was a couple of days ago now and a lot of water has passed under the bridge.

 

I’ll leave it hardcoded for now as it does seem to be picking up the setting in pgAdmin.

 

Thanks for the link to the manual.

 

 

Cheers,
Alan.


From: Scott Mead [mailto:scott.lists@enterprisedb.com]
Sent: 30 July 2009 01:14
To: alan@anitltd.co.uk
Cc: Chris; pgsql-general@postgresql.org
Subject: Re: [GENERAL] V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf'

 

Re-REM (called commenting for us non-windows geeks :-) the line
 
Look in your data directory, the file exists and is used automatically, you don't need to point the postgresql.conf file to it explicitly.

Look at:
http://www.postgresql.org/docs/8.3/interactive/client-authentication.html

  For details on configuring the file.

Good Luck

--Scott

Re: V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf'

From
"Alan Deane"
Date:
Sorry, yes the error, Doh!.

Standard Server doesn't Listen (sounds like my ex :))

Here it is in full.

Server doesn't listen

could not connect to server; Connection timed out (0x0000274C/10060) Is the
server running on host 192.168.2.99 and accepting TCP/IP connection on port
5432?

As you say, the config looks OK. Very frustrating.

Cheers,
Alan.

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Chris
Sent: 30 July 2009 01:23
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 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

Must be based off where the service name is, I'm not sure.

> 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.

Yeh, I would have thought it would pick up from the data dir not
somewhere else.

> 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.

and the error when you try to connect is?

Did you restart postgres after changing the pg_hba.conf file?

Seems like it should work.

--
Postgresql & php tutorials
http://www.designmagick.com/


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




Alan Deane wrote:
> Sorry, yes the error, Doh!.
>
> Standard Server doesn't Listen (sounds like my ex :))
>
> Here it is in full.
>
> Server doesn't listen
>
> could not connect to server; Connection timed out (0x0000274C/10060) Is the
> server running on host 192.168.2.99 and accepting TCP/IP connection on port
> 5432?

Anything in the postgres logs or windows event logger?

Can you manually telnet to that?

Try
- from the postgres server back to itself (127.0.0.1 5432)
- from the postgres server to it's ip (2.99)
- from another machine

It still sounds like it's firewall related.

--
Postgresql & php tutorials
http://www.designmagick.com/




On Wed, Jul 29, 2009 at 9:14 PM, Alan Deane <alan@anitltd.co.uk> wrote:
Sorry, yes the error, Doh!.

Standard Server doesn't Listen (sounds like my ex :))

Here it is in full.

Server doesn't listen

could not connect to server; Connection timed out (0x0000274C/10060) Is the
server running on host 192.168.2.99 and accepting TCP/IP connection on port
5432?

In postgresql.conf, set:

listen_addresses='*'

Then restart the server.

That should do the trick.

--Scott


As you say, the config looks OK. Very frustrating.

Cheers,
Alan.

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Chris
Sent: 30 July 2009 01:23
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 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

Must be based off where the service name is, I'm not sure.

> 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.

Yeh, I would have thought it would pick up from the data dir not
somewhere else.

> 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.

and the error when you try to connect is?

Did you restart postgres after changing the pg_hba.conf file?

Seems like it should work.

--
Postgresql & php tutorials
http://www.designmagick.com/


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Re: V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf'

From
"Alan Deane"
Date:
Hi Chris,

I can connect to the server locally with PgAdmin using

localhost: 5432
192.168.2.99: 5432
127.0.0.1 : 5432

As for the Windows event logs they are all fine.

The server logs. Look OK except for
%LOG: invalid length of startup packet which could have been when I was
trying to telnet in.

What is very interesting is the following from the Status log
I have three connections now, all from my local machine, local host,
127.0.0.1 and 192.168.2.99 and what is very interesting is the following
from the Status log is the client column.

192.168.2.99:3321
127.0.0.1:3237
127.0.0.1:3223

Which is telling me that it is using different outgoing ports. Which means
it will probably be a problem with the firewall as I think I set both
incoming and outgoing to 5432.

Will have to go and see if changing the outgoing to any makes a difference.

Will reports back soon.

Thanks,
Alan.





-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Chris
Sent: 30 July 2009 02:23
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:
> Sorry, yes the error, Doh!.
>
> Standard Server doesn't Listen (sounds like my ex :))
>
> Here it is in full.
>
> Server doesn't listen
>
> could not connect to server; Connection timed out (0x0000274C/10060) Is
the
> server running on host 192.168.2.99 and accepting TCP/IP connection on
port
> 5432?

Anything in the postgres logs or windows event logger?

Can you manually telnet to that?

Try
- from the postgres server back to itself (127.0.0.1 5432)
- from the postgres server to it's ip (2.99)
- from another machine

It still sounds like it's firewall related.

--
Postgresql & php tutorials
http://www.designmagick.com/


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




Re: V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf'

From
"Alan Deane"
Date:

Hi Scott,

 

Yep, already have that set.

 

Thanks anyway.

Alan

 


From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Scott Mead
Sent: 30 July 2009 02:45
To: alan@anitltd.co.uk
Cc: Chris; pgsql-general@postgresql.org
Subject: Re: [GENERAL] V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf'

 

 

On Wed, Jul 29, 2009 at 9:14 PM, Alan Deane <alan@anitltd.co.uk> wrote:

Sorry, yes the error, Doh!.

Standard Server doesn't Listen (sounds like my ex :))

Here it is in full.

Server doesn't listen

could not connect to server; Connection timed out (0x0000274C/10060) Is the
server running on host 192.168.2.99 and accepting TCP/IP connection on port
5432?


In postgresql.conf, set:

listen_addresses='*'

Then restart the server.

That should do the trick.

--Scott



As you say, the config looks OK. Very frustrating.

Cheers,
Alan.


-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Chris
Sent: 30 July 2009 01:23
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 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

Must be based off where the service name is, I'm not sure.

> 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.

Yeh, I would have thought it would pick up from the data dir not
somewhere else.

> 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         numericlinkwarning 127.0.0.1/32          md5
> host    all         all         numericlinkwarning 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.

and the error when you try to connect is?

Did you restart postgres after changing the pg_hba.conf file?

Seems like it should work.

--
Postgresql & php tutorials
http://www.designmagick.com/


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

 

Re: V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf'

From
"Alan Deane"
Date:
Ok,
I have just had a look at the firewall network monitor (Open Ports) and the
following is showing.

5432    TCP    POSTGRES.EXE    -D "G:/PROGRAM FILES/POSTGRESQL/8.3/DATA"
127.0.0.1    02:11:46
4141    UDP    POSTGRES.EXE    -D "G:/PROGRAM FILES/POSTGRESQL/8.3/DATA"
127.0.0.1    02:12:56

Which looks OK to me.

I uses more investigation is required

Alan


-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Alan Deane
Sent: 30 July 2009 03:00
To: 'Chris'
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] V8.3 fails to start after unremming hba_file =
'ConfigDir/pg_hba.conf'

Hi Chris,

I can connect to the server locally with PgAdmin using

localhost: 5432
192.168.2.99: 5432
127.0.0.1 : 5432

As for the Windows event logs they are all fine.

The server logs. Look OK except for
%LOG: invalid length of startup packet which could have been when I was
trying to telnet in.

What is very interesting is the following from the Status log
I have three connections now, all from my local machine, local host,
127.0.0.1 and 192.168.2.99 and what is very interesting is the following
from the Status log is the client column.

192.168.2.99:3321
127.0.0.1:3237
127.0.0.1:3223

Which is telling me that it is using different outgoing ports. Which means
it will probably be a problem with the firewall as I think I set both
incoming and outgoing to 5432.

Will have to go and see if changing the outgoing to any makes a difference.

Will reports back soon.

Thanks,
Alan.





-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Chris
Sent: 30 July 2009 02:23
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:
> Sorry, yes the error, Doh!.
>
> Standard Server doesn't Listen (sounds like my ex :))
>
> Here it is in full.
>
> Server doesn't listen
>
> could not connect to server; Connection timed out (0x0000274C/10060) Is
the
> server running on host 192.168.2.99 and accepting TCP/IP connection on
port
> 5432?

Anything in the postgres logs or windows event logger?

Can you manually telnet to that?

Try
- from the postgres server back to itself (127.0.0.1 5432)
- from the postgres server to it's ip (2.99)
- from another machine

It still sounds like it's firewall related.

--
Postgresql & php tutorials
http://www.designmagick.com/


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




Re: V8.3 fails to start after unremming hba_file = 'ConfigDir/pg_hba.conf'

From
"Alan Deane"
Date:
I have now isolated the problem to the firewall as suspected.

I found that when I disabled Kaspersky firewall the bloody Windows firewall
would kick in unbeknown to me.

Once that was disabled as well then I could connect from another machine on
the LAN.

So the next step is easy, configure Kaspersky to let it through.

Chris,
Thank you very much for your help it is really appreciated. I guess I would
have got there in the end but it always helps when someone else throws ideas
at you.

Thanks again,
Alan.



-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Alan Deane
Sent: 30 July 2009 03:15
To: alan@anitltd.co.uk; 'Chris'
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] V8.3 fails to start after unremming hba_file =
'ConfigDir/pg_hba.conf'

Ok,
I have just had a look at the firewall network monitor (Open Ports) and the
following is showing.

5432    TCP    POSTGRES.EXE    -D "G:/PROGRAM FILES/POSTGRESQL/8.3/DATA"
127.0.0.1    02:11:46
4141    UDP    POSTGRES.EXE    -D "G:/PROGRAM FILES/POSTGRESQL/8.3/DATA"
127.0.0.1    02:12:56

Which looks OK to me.

I uses more investigation is required

Alan


-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Alan Deane
Sent: 30 July 2009 03:00
To: 'Chris'
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] V8.3 fails to start after unremming hba_file =
'ConfigDir/pg_hba.conf'

Hi Chris,

I can connect to the server locally with PgAdmin using

localhost: 5432
192.168.2.99: 5432
127.0.0.1 : 5432

As for the Windows event logs they are all fine.

The server logs. Look OK except for
%LOG: invalid length of startup packet which could have been when I was
trying to telnet in.

What is very interesting is the following from the Status log
I have three connections now, all from my local machine, local host,
127.0.0.1 and 192.168.2.99 and what is very interesting is the following
from the Status log is the client column.

192.168.2.99:3321
127.0.0.1:3237
127.0.0.1:3223

Which is telling me that it is using different outgoing ports. Which means
it will probably be a problem with the firewall as I think I set both
incoming and outgoing to 5432.

Will have to go and see if changing the outgoing to any makes a difference.

Will reports back soon.

Thanks,
Alan.





-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Chris
Sent: 30 July 2009 02:23
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:
> Sorry, yes the error, Doh!.
>
> Standard Server doesn't Listen (sounds like my ex :))
>
> Here it is in full.
>
> Server doesn't listen
>
> could not connect to server; Connection timed out (0x0000274C/10060) Is
the
> server running on host 192.168.2.99 and accepting TCP/IP connection on
port
> 5432?

Anything in the postgres logs or windows event logger?

Can you manually telnet to that?

Try
- from the postgres server back to itself (127.0.0.1 5432)
- from the postgres server to it's ip (2.99)
- from another machine

It still sounds like it's firewall related.

--
Postgresql & php tutorials
http://www.designmagick.com/


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general






On Wed, Jul 29, 2009 at 9:14 PM, Alan Deane <alan@anitltd.co.uk> wrote:
Sorry, yes the error, Doh!.

Standard Server doesn't Listen (sounds like my ex :))

Here it is in full.

Server doesn't listen

could not connect to server; Connection timed out (0x0000274C/10060) Is the
server running on host 192.168.2.99 and accepting TCP/IP connection on port
5432?

In postgresql.conf, set:

listen_addresses='*'

Then restart the server.

Then (in windows, right?) do a:

   netstat -a

  Look for port 5432.

--Scott
 


As you say, the config looks OK. Very frustrating.

Cheers,
Alan.

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Chris
Sent: 30 July 2009 01:23
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 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

Must be based off where the service name is, I'm not sure.

> 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.

Yeh, I would have thought it would pick up from the data dir not
somewhere else.

> 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.

and the error when you try to connect is?

Did you restart postgres after changing the pg_hba.conf file?

Seems like it should work.

--
Postgresql & php tutorials
http://www.designmagick.com/


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Blog post about Amazon Elastic Block Storage

From
John Cheng
Date:
I know quite a number of people here, like myself, are intrigued by the prospect of running PostgreSQL on Amazon's EC.
Ithought this blog post on the performance of EBS was interesting, so I figure I'd share it with everybody. 

http://orion.heroku.com/past/2009/7/29/io_performance_on_ebs/


----
John L. Cheng







Re: Blog post about Amazon Elastic Block Storage

From
Tom Lane
Date:
John Cheng <jlcheng@ymail.com> writes:
> I know quite a number of people here, like myself, are intrigued by the prospect of running PostgreSQL on Amazon's
EC.I thought this blog post on the performance of EBS was interesting, so I figure I'd share it with everybody. 

> http://orion.heroku.com/past/2009/7/29/io_performance_on_ebs/

7000 seeks per second?  Somehow I don't believe that.  Especially not
in tandem with the sub-megabyte-per-second throughput figures ...

            regards, tom lane