Thread: problems connecting remote postgresql server
We've recently installed postgresql8 in windows, created a database and started the service from start menu. We are using pgadmin. Then we want to connect to it from another windows machine from pgadmin also, but we get this error: "Ha ocurrido unerror: could not connect to server: connection time out... Is the port opened...?" Or something like this. We think the problem doesn't reside on firewall, because we've been able to open ports for another appications in this machine and connect to them remotely. What's the problem? Anyone can help me, please? Thank you in advance. -- View this message in context: http://www.nabble.com/problems-connecting-remote-postgresql-server-tf2264760.html#a6284114 Sent from the PostgreSQL - novice forum at Nabble.com.
Sorry, I forgot to say the database functions perfectly on localhost. The problem is in remote hosts: I cannot connect to the database from differents machines than postgresql server. Anyone can help me, please? developer_student wrote: > > We've recently installed postgresql8 in windows, created a database and > started the service from start menu. We are using pgadmin. > > Then we want to connect to it from another windows machine from pgadmin > also, but we get this error: > > "Ha ocurrido unerror: > could not connect to server: connection time out... > Is the port opened...?" > > Or something like this. > > We think the problem doesn't reside on firewall, because we've been able > to open ports for another appications in this machine and connect to them > remotely. > What's the problem? Anyone can help me, please? > > Thank you in advance. > -- View this message in context: http://www.nabble.com/problems-connecting-remote-postgresql-server-tf2264760.html#a6286933 Sent from the PostgreSQL - novice forum at Nabble.com.
> Sorry, I forgot to say the database functions perfectly on localhost. The > problem is in remote hosts: I cannot connect to the database from differents > machines than postgresql server. > > Anyone can help me, please? If you take a look at your pg_hba.conf file, you will see where postgresql can be configured to allow remote connections. Any changes made to the .conf file will only take effect once postgresql is restarted. If you spend about 10 to 15 minutes reading the following link you should be able to get remote connections working. http://www.postgresql.org/docs/8.1/interactive/client-authentication.html#AUTH-PG-HBA-CONF Regards, Richard Broersma Jr.
The error message sounded more like that particular port Postgres is listening (default is 5432) to is not open on the firewall. Check with your network admin to make sure that particular port is opened. Also, ensure that your pg_hba.conf file is configured properly to allow client connections. -- Husam -----Original Message----- From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of developer_student Sent: Wednesday, September 13, 2006 4:57 AM To: pgsql-novice@postgresql.org Subject: [NOVICE] problems connecting remote postgresql server We've recently installed postgresql8 in windows, created a database and started the service from start menu. We are using pgadmin. Then we want to connect to it from another windows machine from pgadmin also, but we get this error: "Ha ocurrido unerror: could not connect to server: connection time out... Is the port opened...?" Or something like this. We think the problem doesn't reside on firewall, because we've been able to open ports for another appications in this machine and connect to them remotely. What's the problem? Anyone can help me, please? Thank you in advance. -- View this message in context: http://www.nabble.com/problems-connecting-remote-postgresql-server-tf226 4760.html#a6284114 Sent from the PostgreSQL - novice forum at Nabble.com. ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq ********************************************************************** This message contains confidential information intended only for the use of the addressee(s) named above and may containinformation that is legally privileged. If you are not the addressee, or the person responsible for delivering itto the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictlyprohibited. If you have received this message by mistake, please immediately notify us by replying to the messageand delete the original message immediately thereafter. Thank you. FADLD Tag **********************************************************************
Yes, you were right at beginning. Two files must be edited: pg_hba.conf and potgresql.conf In pg_hba.conf , you must append a line like this: host all all 123.123.123.123/32 md5 Remember to change 123.123.123.123 to the IP which must connect to the database server. In postgresql.conf, you can see at first a commented line like this: #listen_addresses = 'localhost' # what IP address(es) to listen on; Then I changed it to: #listen_addresses = '*' This means every IP can connect to the database server. An happily, everything worked! P.D.: I want to thank the developers group and the forum people because of their fantastic work and help. Bye! -- View this message in context: http://www.nabble.com/problems-connecting-remote-postgresql-server-tf2264760.html#a6338797 Sent from the PostgreSQL - novice forum at Nabble.com.
Sorry, I wanted to say last post this line: listen_addresses = '*' So it must be typed without the '#' character. In the other hand, it is commented. A neglect ;-) Bye! -- View this message in context: http://www.nabble.com/problems-connecting-remote-postgresql-server-tf2264760.html#a6338818 Sent from the PostgreSQL - novice forum at Nabble.com.