Page 1 of 1
Error #: 1 - Unable to connect to PostgreSQL (Port #: 5432)

Posted:
Sat Jul 19, 2008 12:30 pm
by malpractis
My poker tracker is working perfectly except for the options in "utilities>postgres database functions" this has been the case since i installed postgres 8.3. When I try to access these options it gives me an error saying "Unable to conect to PostgreSQL (Port #: 5432) to get the list of databases. The error was: 101 - SQLSTATE = 08001 server closed the connection unexpectedly... This is most likely due to the fact that the database server is not running on this port... "
The postgres settings are set to the following:
Port: 5432
Server: Localhost
Username: Postgrest
Password: (dont know but i changed the md5 to trust (see below))
ODBC entry to use: PostgreSQL unicode
Encoding: unicode
I have verified that the service is running and starts when i restart the computer. I also changed the pg_hba.conf md5 to trust. I found the file in "C:/program files/PostgreSQL/8.3/data/pg_hba.conf". There was no option to edit it so i changed it to a .txt file and then changed back to a .conf file and verified that it saved.
Please help and let me know if any more info is needed. Thank you!
Re: Error #: 1 - Unable to connect to PostgreSQL (Port #: 5432)

Posted:
Sat Jul 19, 2008 12:56 pm
by ptrack pat
Go to the Start > Programs > PostgreSQL 8.3 > pgAdmin III window.
Right-click on the red X near the top left of the window and select "connect" from the popup menu.
Enter your p/w when prompted.
Does this connect so you can see a list of all the PostgreSQL databases or does it give an error too?
Re: Error #: 1 - Unable to connect to PostgreSQL (Port #: 5432)

Posted:
Sat Jul 19, 2008 3:41 pm
by malpractis
This also gives an error:
An error has occurred:
"Error connecting to server: expected authentication request from server, but recieved" is all it says
This error pops up regaurdless of what password i enter, as i stated before i only have a best guess of what the password is but i did change both md5 settings to trust.
Re: Error #: 1 - Unable to connect to PostgreSQL (Port #: 5432)

Posted:
Sat Jul 19, 2008 4:40 pm
by ptrack pat
It's not the password that is the problem. Go to the Start > Settings > Control Panel > Admin Tools > Services window.
Find PostgreSQL 8.3 in the list. Does it say it's started? If not, try to start it. Does that give an error.
When did you last backup the database?
Re: Error #: 1 - Unable to connect to PostgreSQL (Port #: 5432)

Posted:
Sat Jul 19, 2008 5:06 pm
by malpractis
Yes the service is started and running, it is set on automatic and i checked it after a restart and verified that it does come on automatically. As for backing up the database i do it every time i compact the database, last time was maybe 2-3 days ago, but as i said this has been a problem for as long as i can remember, i just haven't had a need for the database functions until now.
Re: Error #: 1 - Unable to connect to PostgreSQL (Port #: 5432)

Posted:
Sat Jul 19, 2008 7:16 pm
by ptrack pat
There is something wrong with the PostgreSQL setup that is not allowing PT or pgAdmin to access it to get a list of databases.
How have you been compacting and backing up the database if you can't use the PostgreSQL Database Functions window at all, were you using an older version of PostgreSQL before this?
Re: Error #: 1 - Unable to connect to PostgreSQL (Port #: 5432)

Posted:
Sat Jul 19, 2008 11:31 pm
by malpractis
yes i was using an older version of postgres before this, i completely removed it before installing 8.3.
if i go to "utilities>compact a poker database" it still asks me to back up the db and compacts it successfully w.o error this has never been an issue and is not now
The main reason i am trying to access database functions is to restore my database from 2-3 days ago. I did a defragment and moved some files around and for some reason the database reset itself and doesnt show anything from before that. (i recieved no errors from this, just the hands wernt there)
Everything in the last 2-3 days is showing and i can still compact from the last 2-3 days w.o error,
i had compacted and backed up the database a few hours prior to defraging and moving files so i know i have the backup database file
database functions has never worked even before this happend, i just didnt need it so i didnt bother fixing it, If theres a way to restore the db w.o going into db functions then you can just tell me that, although it would be nice to have my ptracker and postgres working properly to insure no future errors or problems.
Re: Error #: 1 - Unable to connect to PostgreSQL (Port #: 5432)

Posted:
Sun Jul 20, 2008 8:43 am
by ptrack pat
The compact database option is for Access databases only. If you were using a PostgreSQL database it would tell you that this option is for Access only and it wouldn't do anything. Therefore I think you are not using PostgreSQL like you think you are.
Open the File > Maintain Database Names window. What entry there is marked as the "Dflt" database? Is the database type listed as Access?
Re: Error #: 1 - Unable to connect to PostgreSQL (Port #: 5432)

Posted:
Sun Jul 20, 2008 12:16 pm
by malpractis
yes
Re: Error #: 1 - Unable to connect to PostgreSQL (Port #: 5432)

Posted:
Sun Jul 20, 2008 1:57 pm
by ptrack pat
You aren't using PostgreSQL then. I suggest you uninstall PostgreSQL 8.3.
Then delete the remnants of the c:\program files\postgesql\8.3 folder.
Then reinstall it. Download this version of PostgreSQL:
http://wwwmaster.postgresql.org/downloa ... .3.1-1.zipExtract all the files out of the ZIP file into a separate folder.
Then double-click on the postgresql-8.3.msi file to install it.
The last part of the install is the Stack Builder application you can run. See here for what to select...
archives/PT2/viewtopic.php?t=24880Then try to convert that Access database to PostgreSQL using the Utilities > Convert Database window.