Java and IPv6 on BSD - it does not work well

Benno Overeinder benno at
Wed Oct 15 09:15:43 UTC 2008


On 10/14/08 6:41 PM, Frank Behrens wrote:
> My conclusion:
> It is very difficult or impossible to use the current (1.6.0) Java 
> implementation for server services if they should listen on IPv4 and 
> IPv6 addresses. With many BSD's default settings it is not even 
> possible to bind to a combined IPv4/IPv6 wildcard address. 
> The current Sun Java implementation should be changed in a way, that 
> the socket is created with the right address family after the bind 
> address has been determined.
> You can read the complete test description and my observations on
> Do you agree or do you have other experiences?
> [Note: I read the list, no Cc: necessary]

Thank you for the extensive set of tests.

On August 25th, 2008 I submitted a post to this email list describing
problems with IPv6 and DNS SRV query type.  Short summary, DNS SRV query
type works fine with IPv4 on FreeBSD, but with IPv6 enabled JRE on
FreeBSD, DNS SRV query types result in a DNS error [Root exception is Invalid argument].  From what I can deduce, with
IPv6 it tries to resolve as an ordinary A
(or quad A) query type (which indeed should give a DNS error), instead
of the requested DNS SRV query type.

The Java code does work correctly in IPv6 mode on Linux, Mac OS X, and

Maybe the error is a result of one of the basic operations that fail in
your test suite.


-- Benno

Benno J. Overeinder
NLnet Labs

More information about the freebsd-java mailing list