Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UCX2x-00068U-5A for pgsql-jdbc@arkaria.postgresql.org; Mon, 04 Mar 2013 15:11:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UCX2w-0002T7-HT for pgsql-jdbc@arkaria.postgresql.org; Mon, 04 Mar 2013 15:11:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UCX2v-0002T2-PH for pgsql-jdbc@postgresql.org; Mon, 04 Mar 2013 15:11:21 +0000 Received: from smtp.n-able.com ([66.46.200.5]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UCX2o-0002I2-3g for pgsql-jdbc@postgresql.org; Mon, 04 Mar 2013 15:11:20 +0000 Received: from oscar.engineering.n-able.com (192.168.20.186) by exchange.office.n-able.com (192.168.10.60) with Microsoft SMTP Server (TLS) id 8.2.176.0; Mon, 4 Mar 2013 10:12:37 -0500 Received: from oscar.engineering.n-able.com (localhost.localdomain [127.0.0.1]) by oscar.engineering.n-able.com (8.14.6/8.14.5) with ESMTP id r24FBBEB005131 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 4 Mar 2013 10:11:11 -0500 Received: (from mattrose@localhost) by oscar.engineering.n-able.com (8.14.6/8.14.6/Submit) id r24FBB6a005129 for pgsql-jdbc@postgresql.org; Mon, 4 Mar 2013 10:11:11 -0500 X-Authentication-Warning: oscar.engineering.n-able.com: mattrose set sender to mrose@n-able.com using -f Date: Mon, 4 Mar 2013 10:11:11 -0500 From: Matt Rose To: Subject: Re: pgsql-jdbc and ident Message-ID: <20130304151111.GC12543@oscar.engineering.n-able.com> References: <20130301160459.GA12543@oscar.engineering.n-able.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org On Sun, Mar 03, 2013 at 10:49:49PM -0500, Ian Pilcher wrote: > On 03/01/2013 10:04 AM, Matt Rose wrote: > > I am having the oddest problem with postgresql-9.2-1002.jdbc3.jar doing > > ident authentication against postgresql-9.2.3 > > Your ident server might be having a problem recognizing IPv6 > connections, including "IPv4-mapped IPv6 addresses" (see > http://en.wikipedia.org/wiki/IPv6#IPv4-mapped_IPv6_addresses). > > Try running your program with -Djava.net.preferIPv4Stack=true to > determine if your problem is IPv6-related. Thank you, that was the problem. [root@localhost ~]# java -jar /home/admin/pgtest.jar Running as user 'root' postgresql JDBC Driver Registered! SQLException: FATAL: Ident authentication failed for user "sqlrelay" SQLState: 28000 VendorError: 0 Exception in thread "main" java.lang.NullPointerException at net.folkwolf.PostgreSQLJDBCDriverTest.main(PostgreSQLJDBCDriverTest.java:35) [root@localhost ~]# java -jar -Djava.net.preferIPv4Stack=true /home/admin/pgtest.jar Running as user 'root' postgresql JDBC Driver Registered! For some reason, even if you specify an ipv4 address in the connection url, the jdbc driver only connects successfully over ipv6. I have some ideas as to why this happens, but I can mull them over later. Thanks again. NB: Also, when I configure my ident server to listen to ipv6, and add an ident map to pg_hba.conf to listen to ipv6 localhost, it also works. Matt > > -- > ======================================================================== > Ian Pilcher arequipeno@gmail.com > Sometimes there's nothing left to do but crash and burn...or die trying. > ======================================================================== > > > > -- > Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-jdbc -- Matt Rose, Systems Engineer, N-able Technologies: mrose@n-able.com -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc