Re: [INTERFACES] Failure to connect remotely to postgresql with JDBC

From: Peter T Mount <peter(at)retep(dot)org(dot)uk>
To: Kelvin SIN <ksin(at)students(dot)cs(dot)mu(dot)OZ(dot)AU>
Cc: pgsql-interfaces(at)postgresql(dot)org, Gregory Scott WEBBER <gsw(at)students(dot)cs(dot)mu(dot)OZ(dot)AU>, Brendan Leigh DWYER <bld(at)students(dot)cs(dot)mu(dot)OZ(dot)AU>
Subject: Re: [INTERFACES] Failure to connect remotely to postgresql with JDBC
Date: 1998-07-29 16:22:27
Message-ID: Pine.LNX.3.96.980729171717.966D-100000@maidast.retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Thu, 30 Jul 1998, Kelvin SIN wrote:

> Hi,
>
> I am using Postgresql 6.3.2 running on a Sun Solaris. The interface I am
> using is JDBC.
>
> When I connect, I received the following error messages:

[snip]

> The url is:
>
> jdbc:postgresql://holly.cs.mu.oz.au:5432/conlayer?user=me&password=abc&
> auth=password

First, the auth=password is no longer used. Since 6.3, the network
protocol changed, and the client and server now negociate the
authentication scheme to use (based on pb_hba.conf).

Also, remember that postgresql users are not the same as unix users.
Unless you have used pg_password to create a password file, then use the
"ALTER USER" sql statement to set a password in the database.

> conlayer is the database name.
>
> That is, the server is holly.cs.mu.oz.au and the port is 5432. postmaster
> is definitely running on holly. The environment variables PGHOST has been
> set to holly.cs.mu.oz.au and PGPORT has been set to 5432. PGLIB and
> PGDATA has also been set correctly. The pg_hba.conf has been set to accept
> all users from anywhere but this doesn't helps. Can someone please help?

Is the client holly aswell?

Do you have the pg_hba.conf file configured to allow the client's IP
address access? Even if they are the same machine, if you specify the host
name, rather name localhost, then you'll need to add the server's IP
address into the file aswell as 127.0.0.1

--
Peter T Mount peter(at)retep(dot)org(dot)uk or petermount(at)earthling(dot)net
Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Nathan DeBardeleben 1998-07-29 23:55:56 Storing Java Objects Through JDBC
Previous Message Sandeep 1998-07-29 15:07:10 Problem in compilation