September 24th, 2012, 04:57 PM
8.4.13 Windows Service fails to start
Apologies for the long post but I want to put in as much detail as possible
I just upgraded from 8.4.1 to 8.4.13 on my laptop (Vista 32 bit) and the installation seemed to go fine. However, when I try and start the windows service I get an error message, after a minute or so, saying:
"The postgresql-8.4 - PostgreSQL Server 8.4 service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs."
There are several postgres.exe process running and I can access the server from the pgAdmin console and the app that I use which has a DB on the server has no issues with connecting to the DB.
When I look in event viewer I see the following errors:
"Timed out waiting for server startup" - always
"Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards.
1 user registry handles leaked from \Registry\User\S-1-5-21-216353801-1092987170-4140225192-1001:
Process 6928 (\Device\HarddiskVolume2\Program Files\PostgreSQL\8.4\bin\postgres.exe) has opened key \REGISTRY\USER\S-1-5-21-216353801-1092987170-4140225192-1001\Software\Microsoft\Windows NT\CurrentVersion" - sometimes
If I kill all the postgres.exe processes and the start a cmd prompt logged in as the postgres user I can issue the start and stop commands with pg_ctl with no error messages (the status command seems to confirm the server running).
Any clues as to why the service won't start the server properly?
September 24th, 2012, 04:59 PM
Any messages in the PostgreSQL log file?
I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags.
Tips on how to ask better questions:
September 24th, 2012, 07:33 PM
The only messages in the log file are:
2012-09-24 21:38:13 BSTLOG: database system was shut down at 2012-09-24 21:15:55 BST
2012-09-24 21:38:13 BSTFATAL: the database system is starting up
2012-09-24 21:38:13 BSTLOG: database system is ready to accept connections
2012-09-24 21:38:14 BSTLOG: autovacuum launcher started
September 30th, 2012, 05:21 PM
OK - have sorted my issue.
I tried upgrading to the latest version 8.4.14 to see if that helped but the same issue was there.
I then noticed 2 TCP errors in event viewer:
BSTWARNING: could not create listen socket for "localhost"
BSTFATAL: could not create any TCP/IP sockets
I cleared the winsock stack using "netsh winsock reset" and then rebooting.
Service starts fine now