Page 1 of 4

Connection refused 0x0000274D/10061

PostPosted: Fri Mar 13, 2009 6:42 pm
by eurythmech
Hi!

Today I noticed a problem with PT2 2.17.03f that looks postgreSQL related.

I get an error message saying
------------------------------------
Unable to connect to the database.

101 - SQLSTATE = 08001
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" and accepting TCP/IP connections on port 5432?
------------------------------------

I've never seen this before, and haven't changed anything wrt PT or SQL lately. PT worked fine two or so days ago, maybe even yesterday. This is a Vista machine btw.

Re: Connection refused 0x0000274D/10061

PostPosted: Fri Mar 13, 2009 8:58 pm
by ptrack pat
Go to the c:\program files\postgresql\8.2\data folder. Is there a file called postmaster.pid there? If so, delete it, restart the computer and try it again.

Re: Connection refused 0x0000274D/10061

PostPosted: Sat Mar 14, 2009 6:10 am
by eurythmech
No, but there's a postmaster.opts

Re: Connection refused 0x0000274D/10061

PostPosted: Sat Mar 14, 2009 9:14 am
by ptrack pat
Go to the Start > Control Panel > Administrative Tools > Services window.
Find PostgreSQL in the list. What version does it say? Is it 8.2 or some other version?
Right-click on it and select "Start". Does this work or give an error?

Re: Connection refused 0x0000274D/10061

PostPosted: Sat Mar 14, 2009 9:24 am
by eurythmech
PostgreSQL Database Server 8.2

It says something like "trying to start this service locally" (my rough translation). A progress bar appears that keeps running for a while, when it's full I get a message saying the service did not answer on time.

Re: Connection refused 0x0000274D/10061

PostPosted: Sat Mar 14, 2009 11:43 am
by ptrack pat
Did you try restarting the computer?
Have you updated Windows or installed any kind of firewall/anti-virus software or updates lately? When was the last time you backed up the database?

Re: Connection refused 0x0000274D/10061

PostPosted: Sat Mar 14, 2009 12:31 pm
by eurythmech
I have restarted the computer, yes.

I have installed automatic Windows updates just the other day, and there actually was something weird about that. First off, it didn't seem to install properly until after I had restarted the computer several times, and also all my settings for the FF extension noscript were wiped out.

Looking through my Windows update history, it was probably one called KB959772, that seemingly had two failed attemps of installing before it was successful.

Re: Connection refused 0x0000274D/10061

PostPosted: Sat Mar 14, 2009 2:04 pm
by ptrack pat
You are going to have the try the following then...

1. Create a new folder on your C drive called PostgreSQL_Data.
2. Go to the c:\program files\postgresql\8.2 folder. Right-click on the "data" folder and select "Copy" from the popup menu.
3. Go to the newly created c:\PostgreSQL_Data folder and right-click and select "Paste" from the popup menu.
4. Now, go to the Start menu and select Settings > Control Panel > Add or Remove Programs and then remove PostgreSQL 8.2 from the list.
5. Now, download and reinstall PostgreSQL as directed here:
http://www.pokertracker.com/products/PT ... nstallSQL2

WITH THE EXCEPTION THAT on the second window where it asks you where you want to install PostgreSQL click on the "Data Directory" button and navigate to the c:\PostgreSQL_Data\data folder and select that. This will force it to try to reuse your old data.

CONTINUE until you get to the window that has the "Initialize Database Cluster" box at the top left corner. UNCHECK THIS BOX and click the Next button and then just continue installing from there.

6. Once the install is done, RESTART YOUR COMPUTER and then try to open PT again.

Re: Connection refused 0x0000274D/10061

PostPosted: Sat Mar 14, 2009 3:17 pm
by eurythmech
I notice now that I didn't answer the question on when I last made a backup.

I haven't ever made a backup on this very computer, as it's rather new, and the database was restored from the backup I made on my old PC.

It seems I still have those files on my PC, as I have a folder with that very name in the C root. I was going to just delete the files there (rather than overwrite when copying), but then I noticed that some of the files and folders in that data folder were last changed this March. This is peculiar as I'm sure I haven't touched them since the end of 08.

I guess what I'm saying is I'm a little hesitant of removing them from fear of them being related to my current PT database.

Re: Connection refused 0x0000274D/10061

PostPosted: Sat Mar 14, 2009 4:01 pm
by ptrack pat
The ..\data folder contains all of the files that PostgreSQL uses for your database. If you are saying that your data folder already is the "C:\PostgreSQL_Data" folder then just create another folder with a different name on the C drive and copy the files from the C:\PostgreSQL_Data\data folder to that new folder.