Re: BUG #5163: Admin can't connect and won't use port 5432 - Mailing list pgsql-bugs

From Craig Ringer
Subject Re: BUG #5163: Admin can't connect and won't use port 5432
Date
Msg-id 4AF22AFE.6050600@postnewspapers.com.au
Whole thread Raw
In response to BUG #5163: Admin can't connect and won't use port 5432  ("Charles" <cnicol@mediasensorcorp.com>)
List pgsql-bugs
cnicol@mediasensorcorp.com wrote:

> Netstat -a shows 0.0.0.0:5432 Listening

First: please reply to the list, not to me. I will not respond to
further mail directly to me. Use the "reply all" button in your mail client.

As for the port: Yes, it's listening, but what process is listening on
it? Get netstat to show the process IDs, then use Task Manager to match
those up with process names. See:

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/netstat.mspx?mfr=true

> But I don't see my IP 192.168.0.199 having that port open.

So maybe it's only listening on 127.0.0.1 (the loopback address) ? Did
you check? Netstat tells you that.

You might need to tell PostgreSQL to listen on all addresses as I think
it may default to listening only on the loopback address for security.

> I noticed when I restart the Postgre server it gives me a message in a
> CMD window that says:
> Server not started
> See nethelp MSG 3521
> And system error 5 has occured

And what happens if you use the "net help" command to display the text
for that error message? (Who knows why Microsoft did it this way rather
than just displaying the error in-place).

Also check the Windows event log to see what might be going on. You can
find the Event Viewer in the Administrative Tools section of the Control
Panel.

> When I run pgAdmin III
> In object browser 1 server is indicated.

Did you check to make sure it's connecting to the right port, after you
restarted the service?

> When I double click it asks for PW then I get an error message as Follows
> "2009-11-04 03:19:09 ESTLOG:  invalid IP mask "md5": Unknown host
> 2009-11-04 03:19:09 ESTCONTEXT:  line 73 of configuration file
> "C:/Program Files/PostgreSQL/8.4/data/pg_hba.conf"
> 2009-11-04 03:19:09 ESTFATAL:  could not load pg_hba.conf"

You've mucked up your pg_hba.conf - it looks like you've deleted the
host specification on a line. if you wanted to say "any host", use
0.0.0.0/0 instead of deleting the entry.

That text appears to be read out of the server error log. It looks like
PgAdmin is helping you out by trying to start the service and when it
fails, looking at the server error log to see why.

> Can you help me get this going?

Not unless you start using the resources you already have, no. USE THE
POSTGRESQL SERVER ERROR LOG - remember where I said it was? It is your
main tool in any troubleshooting process.

PgAdmin II has already done this for you for the immediate problem and
shown you that you've messed up your pg_hba.conf. The error even tells
you the line number and what's wrong with it. I can't actually fix it
for you, and you already have enough information to fix it yourself.

--
Craig Ringer

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: BUG #5161: tome nota del siguiente error un error ha ocurrido 999
Next
From: Fujii Masao
Date:
Subject: Re: BUG #4961: pg_standby.exe crashes with no args