Thread: connection problems

connection problems

From
"Shavonne Marietta Wijesinghe"
Date:
Hello
 
I have my postgresql(ver. 8 ) db on one computer (as localhost) and i'm trying to access it from another computer but i get the error
"could not connect to Server: Connection refused"
 
I followed the guide and changed the listen_address in the postgresql.conf file
listen_addresses='*'
 
and in the pg_hba.conf file I added the IP address of the pc i'm using
host all all 192.168.X.X/32 trust
 
But i get the same error. What should i do??
 
Thank you,
Shavonne

Re: connection problems

From
Tino Schwarze
Date:
On Tue, Apr 01, 2008 at 04:44:29PM +0200, Shavonne Marietta Wijesinghe wrote:

> I have my postgresql(ver. 8 ) db on one computer (as localhost) and i'm trying to access it from another computer but
iget the error 
> "could not connect to Server: Connection refused"
>
> I followed the guide and changed the listen_address in the postgresql.conf file
> listen_addresses='*'
>
> and in the pg_hba.conf file I added the IP address of the pc i'm using
> host all all 192.168.X.X/32 trust
>
> But i get the same error. What should i do??

Did you restart the postmaster after setting listen_addresses?
Does netstat -tln display the appropiate port listening on *:5432 (or
whatever your port number is)?

Tino.

--
„Es gibt keinen Weg zum Frieden. Der Frieden ist der Weg.” (Mahatma Gandhi)

www.craniosacralzentrum.de
www.forteego.de

Re: connection problems

From
"Shavonne Marietta Wijesinghe"
Date:
Thanks Tino. But what do you mean by "netstat -tln" i use the pgadmin.
 
Shavonne
 
Did you restart the postmaster after setting listen_addresses?
Does netstat -tln display the appropiate port listening on *:5432 (or
whatever your port number is)?

Tino.

Re: connection problems

From
Tino Schwarze
Date:
On Tue, Apr 01, 2008 at 05:52:01PM +0200, Shavonne Marietta Wijesinghe wrote:
> Thanks Tino. But what do you mean by "netstat -tln" i use the pgadmin.

So you're on Windows? You didn't mention any operating system...
What does Postgres say on startup?

Tino.

--
„Es gibt keinen Weg zum Frieden. Der Frieden ist der Weg.” (Mahatma Gandhi)

www.craniosacralzentrum.de
www.forteego.de

Re: connection problems

From
"Melissa Peterson"
Date:

Netstat is a separate program that shows the status of your network interfaces. It should come with your operating system. On Windows, you can get to it via the command console. Typing “netstat –ab” at the command prompt should generate a list of the ports on which your server is listening, the ports that have a connection established, and the program bound to that port. For the port that PostgreSQL is supposed to be listening on, you can check that it is actually doing so.

 

Mel Peterson

R&D Engineer

melissa@gigacrete.com

GigaCrete, Inc.

6775 Speedway Boulevard, Suite M-104

Las Vegas, NV  89115

Phone 702-643-6363

Fax 702-543-7010

www.gigacrete.com

 

B U I L D  S T R O N G.  B U I L D  F O R W A R D.

 

This message and any attachments are solely for the intended recipient and may contain confidential or privileged information.  If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is strictly prohibited.  If you have received this communication in error, please notify us by reply email and immediately and permanently delete this message and any attachments.


From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Shavonne Marietta Wijesinghe
Sent: Tuesday, April 01, 2008 8:52 AM
To: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] connection problems

 

Thanks Tino. But what do you mean by "netstat -tln" i use the pgadmin.

 

Shavonne

 
Did you restart the postmaster after setting listen_addresses?
Does netstat -tln display the appropiate port listening on *:5432 (or
whatever your port number is)?
 
Tino.

Re: connection problems

From
"Benjamin Krajmalnik"
Date:
Another option on Windows would be to get the Sysinternals utilities, and use tcpview, which is superior to netstat.
 


From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Melissa Peterson
Sent: Tuesday, April 01, 2008 10:29 AM
To: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] connection problems

Netstat is a separate program that shows the status of your network interfaces. It should come with your operating system. On Windows, you can get to it via the command console. Typing “netstat –ab” at the command prompt should generate a list of the ports on which your server is listening, the ports that have a connection established, and the program bound to that port. For the port that PostgreSQL is supposed to be listening on, you can check that it is actually doing so.

 

Mel Peterson

R&D Engineer

melissa@gigacrete.com

GigaCrete, Inc.

6775 Speedway Boulevard, Suite M-104

Las Vegas, NV  89115

Phone 702-643-6363

Fax 702-543-7010

www.gigacrete.com

 

B U I L D  S T R O N G.  B U I L D  F O R W A R D.

 

This message and any attachments are solely for the intended recipient and may contain confidential or privileged information.  If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is strictly prohibited.  If you have received this communication in error, please notify us by reply email and immediately and permanently delete this message and any attachments.


From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Shavonne Marietta Wijesinghe
Sent: Tuesday, April 01, 2008 8:52 AM
To: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] connection problems

 

Thanks Tino. But what do you mean by "netstat -tln" i use the pgadmin.

 

Shavonne

 
Did you restart the postmaster after setting listen_addresses?
Does netstat -tln display the appropiate port listening on *:5432 (or
whatever your port number is)?
 
Tino.