Skip site navigation (1) Skip section navigation (2)

Re: Problem getting a connection with Postgres 8.0.3

From: Kris Jurka <books(at)ejurka(dot)com>
To: Pedro Mendes <peter_mendes(at)clix(dot)pt>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Problem getting a connection with Postgres 8.0.3
Date: 2005-09-28 22:25:38
Message-ID: Pine.BSO.4.61.0509281723190.17134@leary.csoft.net (view raw or flat)
Thread:
Lists: pgsql-jdbc

On Wed, 28 Sep 2005, Pedro Mendes wrote:

> I'm having some problems connecting my jsp application using driver
> postgresql-8.0-312.jdbc3 to a local postgresql database server. The
> connection seems to be always refused whatever the user and/or database.
>
> DriverManager.getConnection("jdbc:postgresql://192.168.8.2/cgm","cgm","esper
> anca");
>
> Message: Connection refused. Check that the hostname and port are correct
> and that the postmaster is accepting TCP/IP connections.
>

This is a tcpip error message, caused by the server not listening on the 
desired port.  What have you set listen_addresses in postgresql.conf? 
Probably only localhost.  Try adding the server's external address or * to 
listen on all available addresses.

Kris Jurka


In response to

Responses

pgsql-jdbc by date

Next:From: Nelson ArapeDate: 2005-09-29 00:59:42
Subject: Re: Problem getting a connection with Postgres 8.0.3
Previous:From: Pedro MendesDate: 2005-09-28 22:11:11
Subject: Problem getting a connection with Postgres 8.0.3

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group