Re: ident auth postgres 7.4 fedora core 3

From: Ian Pilcher <i(dot)pilcher(at)comcast(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: ident auth postgres 7.4 fedora core 3
Date: 2005-03-07 15:33:03
Message-ID: d0hrsu$q0u$1@sea.gmane.org
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-jdbc

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(dot)pilcher(at)comcast(dot)net
========================================================================

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Sergio Lob 2005-03-07 15:42:49 Re: [BUGS] BUG #1523: precision column value returned from getTypeInfo()
Previous Message Vadim Nasardinov 2005-03-07 15:32:12 Re: ident auth postgres 7.4 fedora core 3