SQL Connection Error messages - PT2 & PA Hud

Forum with tips, support, etc, on using the PostgreSQL database with Poker Tracker. Please post any PostgreSQL questions here.

SQL Connection Error messages - PT2 & PA Hud

Postby TheSword » Tue Aug 12, 2008 9:10 am

Hi, I received the following error messages today when logging on:

Poker Tracker: Unable to connect to database
- 101 SQL state 08001
could not connect to server, connection refused (0x0000274D/10061)
is the server running on localhost and accepting TCP/IP connections on port 5432?

PA Hud:
SQL Connection Exception: Failed to connect to datasource: could not connect to server: Connection Refused (0x0000274D/10061)
is the server running on localhost and accepting TCP/IP connections on port 5432?

I did download a new firewall which I thought had caused the issue, but there it shows no alerts/logs, and the problem persisted when I disabled the firewall. I also had some recent laggy problems with PA Hud which was sometimes only displaying stats for 1-3 out of 6 tables, even though the same players were at some tables, but I guess this is unrelated to this problem?

Any help welcome (please keep it simple!).
TheSword
 
Posts: 14
Joined: Thu Mar 27, 2008 9:05 am

Re: SQL Connection Error messages - PT2 & PA Hud

Postby kraada » Tue Aug 12, 2008 10:03 am

Click Start --> Programs --> PostgreSQL --> Start Services to restart the PostgreSQL service; it sounds like it's not running.

If that doesn't fix your problem, search for and delete the postmaster.pid file and then try to start the service again; if this file exists PostgreSQL will not restart properly.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: SQL Connection Error messages - PT2 & PA Hud

Postby TheSword » Tue Aug 12, 2008 1:22 pm

Thanks for your quick reply. It does look like PostgreSQL isn't starting properly - when I go back to it after a few minutes, the option to start the service is available again.

I cannot find the Postmaster.pid file, although there is a postmaster.ops - I didn't delete this, although if I click on it, I get the message that windows cannot open this file and needs to know what program created it.

As well as firewall, I had a new antivirus installed (iolo), and should have mentioned this, sorry. Not sure if this could have caused the issue?
TheSword
 
Posts: 14
Joined: Thu Mar 27, 2008 9:05 am

Re: SQL Connection Error messages - PT2 & PA Hud

Postby WhiteRider » Tue Aug 12, 2008 2:25 pm

postmaster.pid is a hidden/system file, so make sure you are showing those, or include them when you search.
You could also try temporarily disabling your AV and/or firewall.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: SQL Connection Error messages - PT2 & PA Hud

Postby TheSword » Tue Aug 12, 2008 5:36 pm

I included hidden files in my search, but SQL doesn't show postmaster.pid. SQL clearly isn't starting properly, with or without firewall/AV, so I'm not sure if I will even need to uninstall/reinstall SQL, or do you suggest anything else?

If I need to do this, would I lose any histories and are the firewall/AV (both iolo) likely to cause the same issues?
TheSword
 
Posts: 14
Joined: Thu Mar 27, 2008 9:05 am

Re: SQL Connection Error messages - PT2 & PA Hud

Postby WhiteRider » Wed Aug 13, 2008 5:02 am

Try open the windows Event Viewer after it fails to start and see if anything relevant is reported.
To open Event Viewer, click Start, click Control Panel, double-click Administrative Tools, and then double-click Event Viewer.

I suspect if you re-install postgres on the same set up you will have the same problem, although if you don't have any databases set up it's not a big problem to try. If you DO have any postgres database, don't do this as you will lose them.
Total uninstall/reinstall of pt3.

Hopefully one of the postgres/system experts will have some suggestions too.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: SQL Connection Error messages - PT2 & PA Hud

Postby TheSword » Wed Aug 13, 2008 1:04 pm

Various recent events are logged in the event viewer under "system -information" referring to "the postgreSQL 8.2 service entered the stopped state" and under applications "logger shutting down".

There are also some error messages logged at exactly the same time, such as "the following boot start or system start drivers failed to load: BTKRNL" and "the IPSPEC services terminated - invalid argument supplied" - and a couple of others - not sure if these are even related to this problem?

I do have a pretty big database, so I wouldn't really want to lose this if possible although I guess I would do so as a last resort - I would sooner have a system up and running that I can use.
TheSword
 
Posts: 14
Joined: Thu Mar 27, 2008 9:05 am

Re: SQL Connection Error messages - PT2 & PA Hud

Postby WhiteRider » Wed Aug 13, 2008 1:19 pm

You can back up your database, either using PGAdmin, or using a DOS prompt - see a link at the end of the Database / Postgres FAQ.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: SQL Connection Error messages - PT2 & PA Hud

Postby TheSword » Wed Aug 13, 2008 2:44 pm

Thanks, but this doesn't mean too much to me.

Where do I enter the commands on that were on the link you suggested, which I have pasted below?:

g_dumpall -U postgres > c:\pgbackup
to perform the backup;
wacked postgres and PT completely to simulate a HDD fail. :o
reinstalled PT and postgres, creating a fresh [empty] db.
psql -U postgres -F c:\pgbackup

Is there a basic step-by-step sequence I can follow (doubtless this is basic to many, but not me!)
TheSword
 
Posts: 14
Joined: Thu Mar 27, 2008 9:05 am

Re: SQL Connection Error messages - PT2 & PA Hud

Postby WhiteRider » Wed Aug 13, 2008 5:26 pm

You enter the commands into a command prompt in the postgres folder.
Start -> Programs -> Postgres -> Command Prompt.

Actually - these are PT2 databases, aren't they!?
There are backup functions in PT2, Utilties menu IIRC.

I'm going to move this thread to the PT2 postgres forum - I'm sure Pat will be able to give you more precise instructions.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Next

Return to PostgreSQL Forum

Who is online

Users browsing this forum: No registered users and 4 guests

cron
highfalutin