View Full Version : Can't connect to DB

08-08-2011, 10:32 PM
All of a sudden, out of the blue, when attempting to open HM, get the dialog box "The following error occurred when trying to open the database: Failed to establish a connection to", followed by a database control panel with the default values. Attempting to press "connect" results in a dialog box: "A connection to PostgreSQL could not be made. Would you like to have Holdem Manager attempt to start the service?", selecting yes results in a dialog box "Sorry, Holdem Manager was unable to start the service". Clicking OK, results in another dialog box that says "Holdem Manager has started the service. Please try again."

Been running HM small stakes for a couple years, this is pretty much out of the blue. Was running v. 1.11.07. I thought upgrading to 1.11.07b might do the trick, but it did not.

Running on a Windows 7 machine, i7, plenty of RAM, plenty of HD space.

Any advise?

08-08-2011, 10:41 PM
This is usually a firewall or windows update issue.

Which Operating System, Firewall, and Anti-Virus are you using?

Many of those free Norton, Mcaffee, Comodo, Zonealarm, etc, 'internet security' bundles will not work well with holdem manager.

Please do the following steps, so we can get your computer to a state that we know will work with Holdem Manager:

1) Uninstall any 3rd party security software bundles.
2) Reboot your computer
3) Please install the latest version: http://rvgsoftware.fileburst.com/HmBetaUpdate.exe
4) Enable Windows Firewall's recommended settings through your Control Panel, turn off Windows Defender, and add firewall exceptions for HM and SQL - http://faq.holdemmanager.com/questions/275/Windows+Firewall+%7B47%7D+Defender+Problems
5) Install Microsoft Security Essentials for antivirus/malware protection and update it - Virus, Spyware & Malware Protection | Microsoft Security Essentials (http://www.microsoft.com/security_essentials/)

Make sure windows is fully updated until 'No New Important Updates are Found' (this may require multiple restarts), including Internet Explorer 9 (even if you use a different web browser) and change your Windows Control Panel > Regional Settings Format to English (USA).

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 > secondary logon > right-click > start AND right-click > properties > startup type: automatic.

First try to reboot.

If no help, try this:

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

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

*If UAC is enabled you have to Right-Click > Run As Administrator when you Start/Stop the service.

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

Add exceptions to the windows firewall, even if it is off. If you have a 3rd party firewall, do the equivalent or uninstall it temporarily - http://faq.holdemmanager.com/questions/275/Windows+Firewall+%7B47%7D+Defender+Problems

Please try following these FAQs, step by step:

1) http://faq.holdemmanager.com/questions/91/Can't+Connect+%7B47%7D+Failed+to+Start+PostgreSQL+
2) reinstall the same version of postgresql, using the same \data folder - http://faq.holdemmanager.com/questions/71/Reinstall+PostgreSQL+Preserving+Old+Database
3) http://www.holdemmanager.net/forum/showthread.php?t=8261

If that doesn't help you will probably have to reinstall PostgreSQL completely and reimport your hands using these instructions

1) Uninstall PostgreSQL from the Windows Control Panel.
2) Use our combo installer to reinstall PostgreSQL. Make sure you un-check Holdem Manager during installation. http://www.holdemmanager.com/downloads/Holdem_Manager_Setup.exe

If that installer fails to install PostgreSQL, please reinstall PostgreSQL using the following instructions:

1) Uninstall PostgreSQL from the Windows Control Panel.
2) run the command - start > programs > accessories > command prompt > right-click > run as administrator

net user postgres /delete

4) reboot.
5) Install PostgreSQL 8.3.9 from this link - http://www.holdemmanager.com/downloads/Postgres_8.3.9-v1.0.7.exe

Install it to a new path such as C:\PostgreSQL\8.3 instead of the default installation path.

08-08-2011, 10:52 PM
Thanks for the extremely quick response! I already use MSE as my "suite". I'll check the firewall settings, then run through your list.

Concurrent with this is a recent slow startup time issue. So maybe something is causing it to hiccup, or it may be corrupted. I play NL5 and NL10 on stars, so re-doing the DB is no big issue.

Anyways, running through your list. Will provide feedback on what worked/didn't work.

08-08-2011, 11:47 PM
Starting the DB service via the Control Panel ->Services menu gets it up and running.

Firewall services, and general updates did not work though.