PSQL - server won't listen (connection refused)

Any support related posts should go here.

PSQL - server won't listen (connection refused)

Postby DerekG » Fri Feb 27, 2009 11:39 pm

Rather than continue that long thread I figured I'd start a new one on getting PSQL v8.3 working again on my laptop. To reiterate what happened:
- PSQL v8.3 was installed and working at the time (port 5432)
- Drive was converted from FAT32 to NTFS
- PSQL v8.2 was installed
- PSQL v8.2 was uninstalled
- Somewhere along the way, v8.3 broke down.

When I try to start the server from PGAdmin I get the following message:
Server doesn't listen - could not connect to server: Connection refused.

Stopping and restarting the service doesn't help. It takes a really long time when I try to start, I don't think it is starting but the DOS window disappears before I can read an error message, if any. I doublechecked, but still no postmaster.pid file in \8.3\Data.

I also went into Administrative Tools/Event Viewer and I see the following errors:
The description for event ID (0) in Source (PostgreSQL) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. (?)
FATAL: could not create lock file postmaster.pid: Permission denied
The service process could not connect to the service controller.
DerekG
 
Posts: 273
Joined: Sat Dec 15, 2007 3:24 am

Re: PSQL - server won't listen (connection refused)

Postby ptrack pat » Sat Feb 28, 2009 1:27 am

What I would recommend is reinstalling 8.3. But first....

1. Create a new folder on your drive called PostgreSQL_Data.
2. Go to the [drive]:\program files\postgresql\8.3 folder. Right-click on the "data" folder and select "Copy" from the popup menu.
3. Go to the newly created [drive]:\PostgreSQL_Data folder and right-click and select "Paste" from the popup menu.
4. Now, go to the Start menu and select Settings > Control Panel > Add or Remove Programs and then remove PostgreSQL 8.3 from the list.
5. From the Start menu again select Run. On the window that opens type "COMMAND" and hit OK. This will open a DOS window. Type the following next to the prompt...

net user postgres /delete

and hit ENTER to run it. Then type EXIT to close the DOS window.

6. Now, download and reinstall PostgreSQL 8.3:
http://wwwmaster.postgresql.org/downloa ... .3.6-2.zip

WITH THE EXCEPTION THAT on the second window where it asks you where you want to install PostgreSQL click on the "Data Directory" button and navigate to the [drive]:\PostgreSQL_Data\data folder and select that. This will force it to try to reuse your old data.

CONTINUE until you get to the window that has the "Initialize Database Cluster" box at the top left corner. UNCHECK THIS BOX and click the Next button and then just continue installing from there.

7. Once the install is done, RESTART YOUR COMPUTER and then to see if the service will start now..
ptrack pat
 
Posts: 4841
Joined: Sun Dec 09, 2007 12:38 pm

Re: PSQL - server won't listen (connection refused)

Postby DerekG » Sun Mar 01, 2009 12:39 am

It appears to be working now. Thank you very much.
DerekG
 
Posts: 273
Joined: Sat Dec 15, 2007 3:24 am


Return to PTH Support

Who is online

Users browsing this forum: No registered users and 0 guests