pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ian Pilcher <i.pilcher@comcast.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: ident auth postgres 7.4 fedora core 3
Date: Mon, 07 Mar 2005 09:33:03 -0600
Message-ID: <d0hrsu$q0u$1@sea.gmane.org> (raw)
In-Reply-To: <20050307062838.11055.qmail@web30307.mail.mud.yahoo.com>
References: <20050307062838.11055.qmail@web30307.mail.mud.yahoo.com>

Todd Gee wrote:
> So I just upgraded my RH 9 box to Fedora Core 3 and ident auth
> stopped working.  I've been thru the ident authorization process
> before and have become pretty conversant w/ it, but this issue is
> really strange.  It seems that ident auth is only failing w/ JDBC
> connections.

Since 1.4.2 (I believe), Java uses IPv6 by default.  When a connection
is made to an IPv4 address, it actually makes an IPv6 connection to an
"IPv4-mapped address".  So when you request a connection to 127.0.0.1,
you actually get a connection to ::ffff:127.0.0.1.  PostgreSQL doesn't
know this, however; it asks the ident daemon, "who's connecting from
127.0.0.1?"  The daemon answers "nobody".

I got so frustrated looking for an ident daemon that handles this
situation properly, that I decided to write my own.  It's coming along,
but it's not functional yet.

In the meantime, the easiest approach is probably to tell Java to use
IPv4.  You can do this by setting the java.net.preferIPv4Stack system
property to false.  You may find this page helpful:

     http://java.sun.com/j2se/1.4.2/docs/guide/net/ipv6_guide/

-- 
========================================================================
Ian Pilcher                                        i.pilcher@comcast.net
========================================================================




view thread (12+ messages)  latest in thread

Message-ID: <d0hrsu$q0u$1@sea.gmane.org>
Permalink:  ../d0hrsu$q0u$1@sea.gmane.org/
Also on:    postgresql.org/message-id/d0hrsu$q0u$1@sea.gmane.org

 · 

reply

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: i.pilcher@comcast.net
  Subject: Re: ident auth postgres 7.4 fedora core 3
  In-Reply-To: <d0hrsu$q0u$1@sea.gmane.org>
  References: <20050307062838.11055.qmail@web30307.mail.mud.yahoo.com> <d0hrsu$q0u$1@sea.gmane.org>

* 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