Unix Technical Forum

problems connecting remote postgresql server

This is a discussion on problems connecting remote postgresql server within the pgsql Novice forums, part of the PostgreSQL category; --> We've recently installed postgresql8 in windows, created a database and started the service from start menu. We are using ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Novice

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 10:11 PM
developer_student
 
Posts: n/a
Default 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-conne....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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 10:11 PM
developer_student
 
Posts: n/a
Default Re: problems connecting remote postgresql server


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-conne....html#a6286933
Sent from the PostgreSQL - novice forum at Nabble.com.


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 10:11 PM
Richard Broersma Jr
 
Posts: n/a
Default Re: problems connecting remote postgresql server

> 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/i...TH-PG-HBA-CONF

Regards,

Richard Broersma Jr.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-17-2008, 10:11 PM
Tomeh, Husam
 
Posts: n/a
Default Re: problems connecting remote postgresql server


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
[mailtogsql-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-conne...l-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 contain information that is legally privileged. If you are not the addressee, or the person responsible for delivering it to the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited. If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message immediately thereafter.

Thank you.

FADLD Tag
************************************************** ********************


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-17-2008, 10:11 PM
developer_student
 
Posts: n/a
Default Re: problems connecting remote postgresql server


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-conne....html#a6338797
Sent from the PostgreSQL - novice forum at Nabble.com.


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-17-2008, 10:11 PM
developer_student
 
Posts: n/a
Default Re: problems connecting remote postgresql server



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-conne....html#a6338818
Sent from the PostgreSQL - novice forum at Nabble.com.


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com