PDA

View Full Version : Strange "cannot connect to PostgreSQL" error



yesright
10-24-2011, 02:05 PM
I have tried to start the Postgre server manually but it wont let me.

I havnt changed any setting in Postgre and had been using the same setup for over a year.

Here are some things are tried from the FAQ

Looked at the ect/hosts file, that seemed fine with a 127.0.0.1 in there

tried turning off the windows firewall and all antivirus shields, still no luck

When I click "start server" the box appears, after about 3mins of trying the following message appears


------------------------------

The PostgreSQL Server 8.4 service is starting.......................................... ...................

The PostgreSQL Server 8.4 service could not be started

The service did not report an error

More help is available by typing NET HELPMSG 3534

The start command returned an error (2)

Press (return) to continue.....

-------------------------------


Any ideas as I am completely out of action?

Forgot to add I am using Win XP.

Big_Mick
10-24-2011, 02:31 PM
Yea im getting the same error msg, "failed to establish connection to '127.0.0.1'." I saw a sticky from 2009 tried that but the localhoss 127.0.0.1 was already at the bottom of the host file.

The database control panel wont connect to postgreSQL.
It the says would you like HEM to try and connect, but it cant.
Then it says HEM has started the service. Please try again.

The above is for HEM1 but HEM2 cannot connect either.

yesright
10-24-2011, 02:49 PM
Yea im getting the same error msg, "failed to establish connection to '127.0.0.1'." I saw a sticky from 2009 tried that but the localhoss 127.0.0.1 was already at the bottom of the host file.

The database control panel wont connect to postgreSQL.
It the says would you like HEM to try and connect, but it cant.
Then it says HEM has started the service. Please try again.

The above is for HEM1 but HEM2 cannot connect either.

Yes thats the exact same message im getting.

As per the FAQ i removed all anti-virus software, disabled Windows firewall

I tried to start it in admin tools and it said it started but then stopped again instantly?

I dont know what to do, I dont want to lose my DB but it seems strange we both get the same thing at the same time?

yesright
10-24-2011, 02:55 PM
when I login to pgAdmin III and try to connect by double clicking on postgreSQL

It says "connection refused (0x0000274D/10061)

Whatever that means?

Big_Mick
10-24-2011, 02:56 PM
what security software do you use?

yesright
10-24-2011, 03:10 PM
what security software do you use?

Avast but I completely removed it unless it changed something?

Big_Mick
10-24-2011, 03:18 PM
Yea me too, iv uninstalled comodo and superantispyware aswel and im still having the same problem.

yesright
10-24-2011, 03:34 PM
anyone out there throw out some suggestions as i am out of action and dont know what to do?

Big_Mick
10-24-2011, 03:42 PM
Iv got mine working, try this taken from the FAQs


Restart PostgreSQL service & Reboot

Go to Start > Programs > PostgreSQL > 8.x > Stop Service (If its already started)
Then go to Start > Programs > PostgreSQL > 8.x > Start Service

If that doesnt help delete the C:\Program Files\postgresql\8.x\data\postmaster.pid file (it may not be there, that is perfectly fine)
Finally, if none of the above works a simple reboot can often resolve the issue

yesright
10-24-2011, 03:48 PM
Iv got mine working, try this taken from the FAQs


Restart PostgreSQL service & Reboot

Go to Start > Programs > PostgreSQL > 8.x > Stop Service (If its already started)
Then go to Start > Programs > PostgreSQL > 8.x > Start Service

If that doesnt help delete the C:\Program Files\postgresql\8.x\data\postmaster.pid file (it may not be there, that is perfectly fine)
Finally, if none of the above works a simple reboot can often resolve the issue

I dont have a postmaster.pid file just a postmaster.opts file............ is that the same?

yesright
10-24-2011, 03:49 PM
also the FAQ for re-installing postgreSQL points to an 8.3 setup file?

Where is the 8.4 setup file as thats the version I am running.

Big_Mick
10-24-2011, 03:57 PM
i have no idea im afraid. Its the same file 8.4 is just the update version.

yesright
10-24-2011, 04:14 PM
I dont want to re-install really as its says its "hit or miss" if I recover my DB, thats not exactly encouraging.

does anyone have any suggestions on forums that might help me?

yesright
10-24-2011, 04:41 PM
Im at a total loss, I have followed everything posted in the FAQ except re-install.

The installer linked in the FAQ is for 8.3, yet it says clearly if you want to recover your DB it must match (I have 8.4)

I have a huge DB which would take at least a week to re-install.

I would be willing to pay for help.

yesright
10-24-2011, 05:13 PM
I managed to re-install but nothing changed at all?

Any other ideas why this is not working?

when I try to start the server, the process pg_ctl.exe altenates bwteen 4860K and 5088K in the task manager until it fails.

Starting from admin tools gives the following

"The postgresql-8.4 -PostgreSQL server 8.4 service on Local Computer started and then stopped"

yesright
10-24-2011, 05:37 PM
Ok, I got it to work again.

Not sure exactly what I did (combination of tips I read around the internet) but its working at boot and all looks fine......