PDA

View Full Version : Can't start PostgreSQL server



noap_
09-21-2011, 05:13 PM
First I got this message from HM after starting it:
The following error occurred when trying to open the database: Failed to establish a connection to '127.0.0.1'.

So I checked this FAQ (http://faq.holdemmanager.com/questions/91/Can%27t+Connect+%7B47%7D+Failed+to+Start+PostgreSQ L+) but couldn't find a solution.

I ended up uninstalling my old version of PostgreSQL 9.0 and installed PostgreSQL 9.1, but still the same error when starting HM.

During installation (rather during the step "Starting the database server...") a window pops up and says:
Problem running post-install step. Installation may not complete correctly
Failed to start the database server.

I've tried to manually start the servier via pgAdmin III but that doesn't work either.


Any idea?
(I'm using HM version 1.12.03b)

Patvs
09-21-2011, 11:09 PM
Turn on the secondary Logon. The secondary logon service is a standard windows service which is available on every windows computer. In the latest versions it is not started automatically. You need to start it via control panel > administrative tools > services. Starting it once should insure it works in the future also.


This is usually a firewall or windows update issue.

First try to reboot.

If no help, try this:

Start > Programs > PostgreSQL > 8.x > Stop Service

Start > Programs > PostgreSQL > 8.x > Start Service

If that doesnt help delete the \postgresql\8.x\data\postmaster.pid file, if you see it. And reboot.


If that doesn't help you will have to reinstall PostgreSQL completely
Try 8.2: PostgreSQL: Choose a Mirror (http://wwwmaster.postgresql.org/download/mirrors-ftp/binary/v8.2.21/win32/postgresql-8.2.21-1.zip)

noap_
09-22-2011, 02:55 AM
Turn on the secondary Logon. The secondary logon service is a standard windows service which is available on every windows computer. In the latest versions it is not started automatically. You need to start it via control panel > administrative tools > services. Starting it once should insure it works in the future also.
Didn't change anything.



This is usually a firewall or windows update issue.

First try to reboot.

If no help, try this:

Start > Programs > PostgreSQL > 8.x > Stop Service

Start > Programs > PostgreSQL > 8.x > Start Service

If that doesnt help delete the \postgresql\8.x\data\postmaster.pid file, if you see it. And reboot.
I've already tried those things mentioned in the FAQ as well.
Btw. I can't find Start > Programs > PostgreSQL > 8.x > Start/Stop Service. Maybe they removed that option in 9.x versions?



If that doesn't help you will have to reinstall PostgreSQL completely
Try 8.2: PostgreSQL: Choose a Mirror
Like I said, I've already tried uninstalling 9.0 and reinstalling 9.1. Do you think installing an older version should help?
Keep in mind I've been running 9.0 for at least 1-2 years now without a single problem until now.


When I'm trying to start postgresql service via services.msc I'm getting this error message:

Der Dienst "postgresql-x64-9.1" auf "Lokaler Computer" konnte nicht gestartet werden.

Fehler 193: 0xc1

Sarek
09-22-2011, 04:10 AM
0). There is no "start-stop service" shortcut in PG 9. You can do it via Control panel - Administrative tools - Services


If you have Win7 (or Vista), consider the following:
1) PC name must be in English and "in one word" - requires reboot after changing.
2) The same for Windows user name. If not - create new Win user with EN name and reboot PC for this user when install Postgres. And he must have admin rights. After installation you can kill this new user - his mission is completed.
3) Secondary logon service must be set to "Autostart".
This is a standard windows service which is available on every windows computer. In the latest versions it is not started automatically. You need to start it via control panel > administrative tools > services.
4) UAC = OFF ( How to Disable and Turn Off UAC in Windows 7 « My Digital Life (http://www.mydigitallife.info/2008/12/30/how-to-disable-and-turn-off-uac-in-windows-7/) )
5) Disable firewall and antivirus when installing Postgres and HM. Or uninstall them at all.
6) All installations must run "as admin" (by right-click on file). And do them as first thing after PC reboot.
7) If you want to change install path for Postgres (or to set non-default folder for database cluster) - download "standalone" installation file from Download PostgreSQL | EnterpriseDB (http://www.enterprisedb.com/products-services-training/pgdownload#windows)
8) If your Windows is not in English - you have to install Postgres not in default folder in Program_Files. Create new (example: c:\postgresql) first and select it when install.
9) Install Postgres and HM separarelly, one after one. As admin. If HM (when runs for the 1st time) says "no database" - simply create it via DBControlpanel.
10) If Postgres install fails - after uninstalling don't forget to kill windows user named "postgres":
Go to Start > Programs > Accessories > Command Prompt > Right-Click > Run As Administrator
In the window that appears please type the following and press enter:
net user postgres /del
exactly as shown. You should get a confirmation if it was successful.
11) Run all pokerclients "as admin" too.

noap_
09-22-2011, 04:13 AM
0). There is no "start-stop service" shortcut in PG 9. You can do it via Control panel - Administrative tools - Services

I guess I just edited my previos post while you wrote your reply.
I've already tried to start the service with the method you described but I got this error message:

Der Dienst "postgresql-x64-9.1" auf "Lokaler Computer" konnte nicht gestartet werden.

Fehler 193: 0xc1



1) PC name must be in English and "in one word" - requires reboot after changing.
What's an english name? Ofc I'm not using ä, ü, ö in my name.


I'll check all the other points and report back in few minutes...



***EDIT***

Thanks man, that solved the problem!
But now HM obviously can't find my old DB any more. Can I restore it from my old "9.0\Data" directory from which I've made a copy before uninstalling and reinstalling?

Playerstats aren't the problem I could restore them from the archive files. But my main concern are player notes. Any way to get them back?

noap_
09-22-2011, 05:17 AM
Besides that the PostgreSQL 9.0 server still shows up in pgAdmin III.
I hope you can find a way to restore my playernotes! :(

netsrak
09-22-2011, 08:50 AM
The only way to restore playernotes is to install the same postgresql version as before and connect it to your old data folder.
http://faq.holdemmanager.com/questions/71/Reinstall+PostgreSQL+Preserving+Old+Database
After completion you can export the notes.

noap_
09-22-2011, 09:56 AM
Thanks again! It worked!