From: rob stone <floriparob@gmail.com>
To: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: Unable to connect to 9.5 via JDBC driver 1207
Date: Wed, 03 Feb 2016 08:21:08 +1100
Message-ID: <1454448068.2165.20.camel@gmail.com> (raw)
In-Reply-To: <n8r2gg$hln$1@ger.gmane.org>
References: <1454432904.2165.6.camel@gmail.com>
<n8qu0f$32m$1@ger.gmane.org>
<CADK3HHJMJ6n2CMQ2yJrasUg_5r08WdEGVWg2f-dcTTVfXnXWtQ@mail.gmail.com>
<n8qv5f$mcf$1@ger.gmane.org>
<CADK3HHKQiE_Ma8D5na+qyQRrKPcHWtBrkuSxSCEcjgqXQrZCGg@mail.gmail.com>
<10633.1454441931@sss.pgh.pa.us>
<n8r2gg$hln$1@ger.gmane.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
On Tue, 2016-02-02 at 21:10 +0100, Thomas Kellerer wrote:
> Tom Lane schrieb am 02.02.2016 um 20:38:
> > > >
> > Since the quoted error message mentions a connection from
> > "127.0.0.1",
> > it's impossible that it is a reply from a remote server (unless
> > your
> > networking configuration is completely broken). Presumably what is
> > happening is that what you think is a connection to a remote PG
> > server
> > is actually being made to localhost, and the local PG server's
> > pg_hba.conf
> > doesn't allow the username and/or dbname. You could check that by
> > turning
> > on log_connections on both servers.
> >
> > As to why that would happen as a consequence of a driver version
> > change,
> > I'm pretty clueless, but I would wonder about differences in driver
> > config
> > files or the driver's interpretation of a connection URL. In any
> > case,
> > certainly not enough information has been given to diagnose it.
>
>
> The initial error message in this thread was not from me.
>
> I am currently not in the office, but I will see if I can reproduce
> that tomorrow.
>
> I have also contacted the SQL Workbench/J user who reported this to
> me last week
> and asked him to describe his setup as well.
>
> In his case, the error message was:
>
> > FATAL: no pg_hba.conf entry for host "213.xxx.xx.xxx", user
> > "foobar", database "postgres", SSL on
>
> If I understood him correctly, he has no access to the server, so the
> only thing he did,
> was to change the driver and he could connect again.
>
> Thomas
>
>
>
I'm using a domain socket connection on my laptop. There is NO network.
I've been using JDBC drivers since Postgres 8.x. The pg_hba.conf file
has always been identical.
postgresql-9.4-1200.jdbc41.jar works fine on 9.4.
The issue is with 9.5.
So "local all all trust" according to the pg_hba.conf doco "translates"
to "localhost domain socket connection, any user, any database and
trust the person connecting" -- i.e. don't validate password.
The package org.postgresql.core.v3.ConnectionFactoryImpl doesn't
display enough information in its error message.
It should display the URL used, which has to be built using pg_hba.conf
plus user input.
This:-
con = DriverManager.getConnection(url, user, password);
is the usual way to connect.
I don't know if using port 5434 for 9.5 is an issue. I'm still using
9.4 and its port number is 5433. (Clutching at straws. Probable red
herring.)
Please let me know if there are any other tests that I can run.
Cheers,
Rob
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: floriparob@gmail.com, spam_eater@gmx.net
Subject: Re: Unable to connect to 9.5 via JDBC driver 1207
In-Reply-To: <1454448068.2165.20.camel@gmail.com>
References: <1454432904.2165.6.camel@gmail.com> <n8qu0f$32m$1@ger.gmane.org> <CADK3HHJMJ6n2CMQ2yJrasUg_5r08WdEGVWg2f-dcTTVfXnXWtQ@mail.gmail.com> <n8qv5f$mcf$1@ger.gmane.org> <CADK3HHKQiE_Ma8D5na+qyQRrKPcHWtBrkuSxSCEcjgqXQrZCGg@mail.gmail.com> <10633.1454441931@sss.pgh.pa.us> <n8r2gg$hln$1@ger.gmane.org> <1454448068.2165.20.camel@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox