Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 May 2006 11:03:14 +1000
From:      Joe Shevland <jshevland@rowantreesoftware.com.au>
To:        Richard Cooper <ric@jonnycalcutta.com>
Cc:        freebsd-java@freebsd.org
Subject:   Re: IPV6 (Re: Connecting to Jetty)
Message-ID:  <4473B0D2.2020202@rowantreesoftware.com.au>
In-Reply-To: <44733A87.8020700@jonnycalcutta.com>
References:  <200605231302.03491.work@ashleymoran.me.uk>	<200605231322.46786.work@ashleymoran.me.uk>	<200605231607.45933.work@ashleymoran.me.uk> <44733A87.8020700@jonnycalcutta.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4473B0D2.2020202>