Thread: trouble connecting to DB

trouble connecting to DB

From
"tgs"
Date:

Hi - I installed PostgreSQL 8.4 on Windows XP Pro using the packaged installer with no errors, but am having a problem connecting.  The symptoms are:

1. When attempting to connect in PGAdmin III, I get an error message:
ERROR  : Error connecting to the server: server closed the connection unexpectedly
 This probably means the server terminated abnormally
 before or while processing the request.

2. The Windows Application and System event logs show no unusual errors just: 'Server Started and accepting connections'.

3. When I start the server, I get something like the following in the postgresql log (in \pg_log):

2009-07-18 22:34:37 MSTLOG:  database system was shut down at 2009-07-18 22:34:33 MST
2009-07-18 22:34:37 MSTLOG:  database system is ready to accept connections
2009-07-18 22:34:37 MSTLOG:  could not receive data from client: An operation was attempted on something that is not a socket. 
2009-07-18 22:34:37 MSTLOG:  incomplete startup packet
2009-07-18 22:34:37 MSTLOG:  autovacuum launcher started
2009-07-18 22:34:39 MSTLOG:  could not receive data from client: An operation was attempted on something that is not a socket. 
2009-07-18 22:34:39 MSTLOG:  incomplete startup packet

(The incomplete startup packet could repeat more times.)

Usually when I've seen the 'connection closed' message with other software, it means an authentication error, so I've tried the following with no luck:

1. Verified the postgres user-id in Computer Management.  It is a member of no groups (seems strange to me, but apparently this is required.)
2. Verified the password by changing it in Computer Management/Users, and in Services 'Login as' to be sure they matched and were what I thought.

3. I've also checked firewall (Comodo Pro) and antivirus (Avira) logs - there are no entries showing postgres being blocked.
4. Also attempted the connect with firewall and antivirus turned off.
5. Since the postgres service is dependent on the RPC service, I verified it was set to Automatic and running.

This is probably something simple and obvious, but I don't see it. Any help would be appreciated.

Thanks,
Terry S. in AZ

 

 

Re: trouble connecting to DB

From
"tgs"
Date:
 
Thanks for the reply Thomas.  Yes, per my prior post I'm using Windows XP Pro.  I have verified the installer gave the postgres user full control on all the subdirectories, and also manually added it for the two parents, (8.4, and postgresql).
 
I've changed the debug level to 'debug5' to  try to see what's going on - as per the prior post I'm getting alternating log entries...

incomplete startup packet

could not receive data from client: An operation was attempted on something that is not a socket.

...repeatedly until the service times out.  When that happens, there are several instances of postgreql.exe running, but the service is not recognized as running.  Attempting to stop the service results in the message 'Service is not started', and I have to manually kill the processes and delete the leftover postmaster.pid file to start again.  I'm really stuck on this one.

Thanks,

Terry S. in AZ

 

 

 

 

Re: trouble connecting to DB

From
Lacey Powers
Date:
Hello Terry,

What are your Windows Firewall/Other Firewall/Antivirus settings?

It would be worthwhile to check them, because they may be causing trouble.

Additionally, this may help.

http://wiki.postgresql.org/wiki/Running_%26_Installing_PostgreSQL_On_Native_Windows

Lacey
 
Thanks for the reply Thomas.  Yes, per my prior post I'm using Windows XP Pro.  I have verified the installer gave the postgres user full control on all the subdirectories, and also manually added it for the two parents, (8.4, and postgresql).
 
I've changed the debug level to 'debug5' to  try to see what's going on - as per the prior post I'm getting alternating log entries...

incomplete startup packet

could not receive data from client: An operation was attempted on something that is not a socket.

...repeatedly until the service times out.  When that happens, there are several instances of postgreql.exe running, but the service is not recognized as running.  Attempting to stop the service results in the message 'Service is not started', and I have to manually kill the processes and delete the leftover postmaster.pid file to start again.  I'm really stuck on this one.

Thanks,

Terry S. in AZ

 

 

 

 


-- 
Lacey Powers

The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564 ext 104
PostgreSQL Replication, Consulting, Custom Development, 24x7 support