PDA

View Full Version : Error when connecting to database.



aenetomic
07-03-2009, 05:36 PM
Let me start off by saying that earlier today holdem manager was working perfectly fine.

The problem seems to be with postgreSQL, but i hope someone can help here.

When i try to connect from holdem manager, The error message reads:

"The following error occurred when trying to open the database: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."

I cannot open the database from pgAdmin III either.

aenetomic
07-03-2009, 05:41 PM
ugh, so bazaar. I restarted again, and now it decided to work.

crisis averted.

aenetomic
07-03-2009, 05:54 PM
ok, still problems.

I've gotten errors at "stage: 2", "stage: 33". I expect there are others. it will open, but then suddenly the connection to the database will close up like i mentioned before.

very strange.

Edit: So it continues to connect & then fail to connect in an unpredictable way. I try the same thing twice within a very short time & in one instance it fails to work & then works in the next.

netsrak
07-03-2009, 05:59 PM
This error is a problem of your firewall / security software. You must configure it for postgresql and holdemmanager communication via Port 5432.

http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=164

aenetomic
07-03-2009, 06:22 PM
so far, no luck.

Everything is being run as admin. UAC is already off.

I've used this fix earlier on when i was first setting up HM. it worked then & i have not had any problems until the last 20 minutes or so.

i have the latest updates as well.

fozzy71
07-03-2009, 07:35 PM
What firewall are you using? I recommend Comodo Personal/Free. If it's the windows firewall, try turning it off completely (and rebooting). If it is a 3rd party firewall, please uninstall it completely (I suggest Revo Uninstaller) and reboot. See if either of those make it more reliable.

Let us know if it doesn't help and we can have someone take a look at it for you.

aenetomic
07-03-2009, 07:46 PM
turned off the firewall (i've got the windows one). rebooted... same problem.

it worked before (like even just earlier today) with all of the antivirus/malware/firewall programs installed & enabled.

I think i'll just reinstall everything.

fozzy71
07-03-2009, 08:13 PM
OK. If you are going to do that, please make sure you backup everything and I would also suggest exporting your entire DB to text files, in addition to your archived/processed hands. I have reinstalled HM and SQL both twice this week on my machine, just so I could try some things that I had never done before, like the backup/restore SQL process.


Vista: Turn off UAC - http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=73

Turn off Windows Firewall for installing HM and PostgreSQL. Once you get those installed you can add exceptions to the firewall. If you have a 3rd party firewall, uninstall it completely before installing HM/SQL - http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=171


Before you uninstall HM:

I want to re-install Holdem Manger without losing all of my settings and preferences. Can this be done? (http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=98)


How do I re-install PostgreSQL and use a previous database? (http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=177)


How do I backup and restore my database? (http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=12)


How do I export or import hands into and from Holdem Manager? (http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=173)


You want to make sure you backup your Processed/Archived hand histories, your entire \config folder, and your exportednotes file. (http://www.holdemmanager.net/faq/?f=119) I usually just copy my entire \Holdem Manager directory.

I would also make sure you manually export the database to hand history text files:

HM > Options > Database Management > Connect > Export Hands

Make sure you copy that folder as well as the other stuff I mentioned.

This helps to insure that if anything goes wrong with the backup/restore, you can manually import the exported files to rebuild.


For uninstalling SQL please follow these steps:

-Download Revo Uninstaller and use it to uninstall PostgreSQL. After it uninstalls it will give you options to select and delete all the associated registry entries.
- manually delete the Program Files\Postgresql folders
- run the command - start > run > cmd >


net user postgres /delete

- reboot.
- install again, with your firewall uninstalled or turned off if windows firewall


Logging:

I would suggest you turn off logging on your new SQL installation as well as these other performance improvements - Top 10: HEM performance increase tips
(http://208.109.95.123/forum/showthread.php?p=62613&posted=1#post62613)

To turn off logging, follow these instructions. This is the first thing I do anytime I install SQL for someone.

- Start > My Computer > Tools > Folder Options > View > UnCheck 'Hide Extensions for known file types' > OK

- C:\Program Files\PostgreSQL\data\postgresql.conf > Right-Click > Open With.. > NotePad > Check 'Always use this program'

- Scroll about half way down to ~Lines 245 - 260:

- The last line of this block of code, for the 'logging_collector', must be changed from On to Off.


------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------

# - Where to Log -

log_destination = 'stderr' # Valid values are combinations of
# stderr, csvlog, syslog and eventlog,
# depending on platform. csvlog
# requires logging_collector to be on.

# This is used when logging to stderr:
logging_collector = off # Enable capturing of stderr and csvlog

File > Save; File > Close

Start > Programs > PostgreSQL 8.3 > Reload Configuration.

*edit:
- Start > My Computer > C:\Program Files\PostgreSQL\data\pg_log, or C:\Program Files (x86)\PostgreSQL\data\pg_log, if you have 64 bit Vista. Delete all files in that folder. And it might be a good idea to empty your recycle bin at that point, or use a 3rd party utility like CCleaner to clean up all your junk/temporary files. You want to do this before you get to the vacuum and defrag process.


When reinstalling HM, install the full setup, then the latest beta patch and finally your config folder. You will have to reconfigure the majority of your HM setttings and preferences, as many things are located in different folders on Vista, compared to XP.

aenetomic
07-03-2009, 08:30 PM
the reinstall has worked. I have my firewall on and all the virus software running. Its operating in the same capacity it was before having problems.

If i run into problems again, I'll refer back to this thread and try some of the solutions you proposed again. As it stands, i still don't know why it stopped working.

thx!

fozzy71
07-03-2009, 08:34 PM
Glad it's working now. PostgreSQL can be quirky. That's why it is important to archive and backup everything, and to periodically export your DB to text and ZIP it up as well. I would rather have too many HH archives than miss some hands. ;)

If you have anymore problems please let us know so we can help.