Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to connect to PostgreSQL 8 from PGAdmin III

Status
Not open for further replies.

Lidinho

Programmer
Sep 29, 2003
12
PT
Hi,

I have been trying to connect to PostgreSQL 8 (which is installed on an FC4 server with a public IP address) from PGAdmin III, and I am getting the following error:


Error connecting to the server: could not connect to server: Connection timed out (0x0000274C/10060)

Is the server running on host “XX.XXX.XXX.XXX” and accepting

TCP/IP connections on port 5432?


From a terminal on the server, I can connect to the ‘test’ database that I created after installation of PostgreSQL.


I have read on various sites on the internet that this issue could be associated with the “tcpip_socket” flag being set to FALSE, but this flag is not available in the postgresql.conf file?



On the postgresql.conf file, I have done the following:

Code:
listen_addresses = '*'

port = 5432


On the pg_hba.conf file, I have done the following:

Located the line beginning with "TYPE" and added entries as applicable
Code:
TYPE     DB        USER    CIDR-ADDRESS             METHOD

host      all         all         XX.XX.XXX.XXX/24        trust # remote access

host      all         all         XX.XX.XX.XX/24            trust # remote access


Any ideas where I am going wrong?

Thanks,
Lidinho

 
Is firewall in FC4 enabled? If so, add port 5432 in in Security Level and Firewall.
 
Hi TimKThailand,

Thanks for your reply.

SELinux is set to permissive, but I would like to change it to enforcing after to connection issue is resolved. There is no hardware firewall.

I would also like to learn more about SELinux - would you be able to point me in the right direction as to where I can read about it.

Could please let me know where to find Security Level?

Thanks,
Lidinho
 
i ran into this problem, when trying to make my app access a pgdb on another server.

the doc tells you to set "tcpip_sockets = true"
on the server which hosts my db there is a newer postgres version with only the "listen_addresses" setting available,
which seems to replace the former setting

since i didn't recompile apache with the newer pg-module on the system i was trying to connect from, i think the whole thing is a postgres-module version issue...
////////////////////////////////////////
anyway, the solution is to just add > tcpip_sockets = true <
to your postgesql.conf file on the server which hosts your pg-db, restart apache, et voila..
this works fine for me now without recompiling/updating
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top