Hello. I have a problem connecting to a PostgreSQL database and I don't know where the problem lays.
 
A bit of background:
 
I installed the psycopg module yesterday (it was a bit of a pain to do it since I installed the wrong version and it didn't work). I got to install it in the end anyway.
 
I have a database hosted in a server (let's call it xxx.yy.com). I need to access that database from another computer. I have configured the PostgreSQL server right (except something I'll explain later), and added the right line to the pg_hba.conf file.
 
After trying to connect to the server using the connect() function in the psycopg module, I get the following error message after a few seconds:
 
"psycopg.OperationalError: could not connect to server: Connection timed out
    Is the server running on host xxx.yy.com and accepting TCP/IP connections on port 5432?"
 
Following the error's suggestion, I went to check the Postgresql.conf file, and realized the "tcpip_socket = true" line was commented. I uncommented the line, and after restarting the server, it crashed, so I commented the line again. I thought that was the source of the problem, but when I checked my netstat, realized that the postgresql server was listening on port 5432... Don't ask me why, since the line "tcpip_socket = true" was commented. But why does the server crash when I try to set tcpip_socket to true?
 
Anyway, I'm now out of possible solutions. Maybe the source of the error lays in a different place. I really need help on this. Has anyone ever gotten the same error message before, or is familiar with it?
 
If you need more information about the error, I'll be glad to share it with you.
Thank you very much for your attention.
 
Jose Carlos.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to