IPV6 (Re: Connecting to Jetty)

Joe Shevland jshevland at rowantreesoftware.com.au
Wed May 24 01:04:03 UTC 2006


Richard Cooper wrote:
> Ashley Moran wrote:
>> On Tuesday 23 May 2006 13:22, Ashley Moran wrote:
>>> Just to narrow this down, I've installed it on my 6.1/i386 desktop 
>>> and it
>>> works, and another 6.1/amd64 server and it fails, can't bind to 
>>> 127.0.0.1.
>>> Is this a bug in the JDK on amd64?
>>>
>>> Ashley
>>
>> Turns out this was failing because I had compiled IPv6 support.  I've 
>> passed a Java option now to use the IPv4 stack and it works.
>>
>> I believe this is a known issue?  It appears impossible to bind to an 
>> (IPv4) address with the IPv6 stack enabled.
>
> Can I ask what variable and exactly how you passed it? I'm having a 
> similar problem with Tomcat and I can't seem to pass the right command 
> to get around the problem.
This might be relevant (or rather the link near the top to the Sun bug 
database):

http://mail-archives.apache.org/mod_mbox/tomcat-dev/200511.mbox/%3C4375392B.7000306@cognitiongroup.biz%3E

and this JBoss wiki entry says it a bit better wrt releases up to JDK 5:

http://wiki.jboss.org/wiki/Wiki.jsp?page=IPv6

So maybe try:

java -Djava.net.preferIPv4Stack=true ...

Cheers
Joe



More information about the freebsd-java mailing list