Videos / Other Resources

No attachments were found.

Can not Connect / Failed to Start PostgreSQL

download-video1.gif   Watch this video for step by step instructions.


* Before trying any steps make sure that Windows is fully fixed and updated.
* If HM2 won't connect to PostgreSQL after a recent Windows update please try these steps first. 

Overview:


- Before trying any steps, always first make sure that Windows is fully fixed and updated.
- If HM2 won't connect to PostgreSQL after a recent Windows update please try these steps first.



Steps to Solve PostgreSQL Connection Problems

  • All steps are completely covered in the attached video.   download-video1.gif
  • Anytime HM2 opens when following these instructions =  PostgreSQL connection is fixed and you can stop troubleshooting the problem.

  1. Make sure windows is up to date by manually checking for Windows updates.  (Video: 00:28)
  2. Make sure Microsoft.NET is up to date.  If you did step 1, .NET should be up to date.  (Video: 00:28)
  3. Check to make sure Window Services are started (Win7 & Vista Only) (Video: 1:28)
    1. Services can be started via control panel > administrative tools > services. We want to make sure "Secondary Logon" and "PostgreSQL" services are started.  
  4. Test your PostgreSQL connection by starting HM2.  (Video 2:30)
    1. In HM2's PostgreSQL connection wizard, click the "Start Service" button.  If that fails, click the "Reset Password" button.
  5. Delete Postmaster.pid file: C:\postgreSQL\data  or  C:\Program Files\postgresql\8.x\data\postmaster.pid  The file might not be there, DONT DELETE ANY FILES OTHER THAN POSTMASTER.PID (Video: 4:55)
  6. Run HM.exe files as Administrator.  (Video: 7:00)
    1. HoldemManager.exe
    2. HudFuncsApp.exe
  7. Turn off UAC.  UAC is Windows User Account Control.  (Video: 7:30)
  8. Test your PostgreSQL connection by starting HM2.
  9. Completely uninstall your Antivirus & Firewall software.  Don't ignore this, you can always reinstall them later.  (Video: 8:24)
  10. Turn off Windows Defender.  (Video: 10:30)
  11. Test your PostgreSQL connection by starting HM2.
  12. You may need to change the Postgresql password.

Advanced Postgresql connection steps

 If these steps still do not help, please see these advanced steps.
 

  • Reset your Winsock Adapter.
  • Update Windows and your Network Adapter. Open Device Manager. Check your Network Adapter model. Search the Company's website for the latest driver to install.
  • Empty the c:\temp and/or c:\Users\Username\AppData\Local\Temp folders.
  • Download the update of the same version of Postgresql you currently use. If you have 8.4, download the latest 8.4.x, etc. Uninstall yours. Install the updated version in the same location, using the same data folder to preserve your database.


Postgres Won't Install?

Make sure to follow the above steps.

  • Allow Port 5432 in your firewall exceptions.
  • Create the C:\ProgramFiles\Postgresql folder (C:\ProgramFiles(x86) if you have a 64-bit system and are using 8.4 or earlier).  Add full control for "Everyone" for this folder. You can read how to edit permissions for folders in this FAQ.
  • Try this standalone PostgreSQL version.


When installing, you may encounter an error stating the database initialization occurred.

If at the end of installing Postgres you get a message:

"The database cluster initialization failed" - proceed as follows:


1. Open Windows Command Prompt: Start - Run - CMD (right click - run as admin). If you have the Creator Update + for 10, this is called Windows POWERSHELL

This opens black (usually) window, enter a command there 

runas /user:postgres cmd

and press Enter (be careful with spaces and slashes)


2. This opens another similar window - you will be asked for password, default is

postgrespass

If all was done correct, you will have command prompt started for user "postgres" (this can be checked in window title)


3. Go to the Postgres install folder (this can be found searching My Computer for postgres), for example:


cd C:\PostgreSQL\9.0\bin


4. Activate manual initializing of database cluster, like this:

initdb -D path_to_data_folder/path_to_data_folder


For example:

initdb -D C:\PostgreSQL\9.0\data


(note1: if path has spaces, surround it in qoutes)

(note2: Data folder mentioned in this path must be totally empty before you run initdb. Usually it is so after you get this installation error. But If there already is something like folder with logs - delete it first).


5. Now go to Start - Control panel - Administrative tools - Services 

p>find postgresql service and start it. 


Then right-click - properties - startup type = Automatic


6. Afterwards please run Start - Programs - Postgresql - PGAdmin III

Double-click on the server line\node at the left

(you will be asked for password, set to save it for the future use)

expand the tree, go to databases and single click on that one existing (with name "postgres")

You may be asked "something is missing, do you want to fix?"

Click OK and proceed.




Logon using Local System Account:

 



1. Windows classic view: Go to Start / right click My Computer / Click Manage / Expand Services and Applications at the bottom left / Services.

2. Scroll to PostgreSQL Database Server. If it isn't started (as indicated in the status column) right click on it and choose Start. If it starts and then stops or was already started, follow the steps below:

3. Right click on PostgreSQL Database Sever and choose Properties. You should see the following dialog.

4. Click on the Log On tab. Copy the username in the This Account field and paste it into Notepad in case you need to use it again. Make sure you know your password as well.

5. Select Local System Account and then click Apply then OK.

6. Restart your PC and see if you still get the error.

7. If it does not fix it, please switch to logon as This Account and enter your username and password again and reboot and continue with the rest of the FAQ.









Delete PostgreSQL User Name Via CMD Prompt.

Go to Start > Programs > Accessories > Command Prompt > Right-Click > Run As Administrator. If you have the Creator Update + for 10, this is called Windows POWERSHELL

In the window that appears, type the following and press enter:

net user postgres /delete




| More

Related Articles


User Opinions (263 votes)

67% thumbs up 32% thumbs down

How would you rate this answer?



Thank you for rating this answer.

Continue