Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 May 2006 10:57:51 +0100
From:      Richard Cooper <ric@jonnycalcutta.com>
To:        freebsd-java@freebsd.org
Subject:   Re: IPV6 Tomcat problems (Was Re: Connecting to Jetty)
Message-ID:  <44742E1F.4050207@jonnycalcutta.com>
In-Reply-To: <4473B0D2.2020202@rowantreesoftware.com.au>
References:  <200605231302.03491.work@ashleymoran.me.uk>	<200605231322.46786.work@ashleymoran.me.uk>	<200605231607.45933.work@ashleymoran.me.uk>	<44733A87.8020700@jonnycalcutta.com> <4473B0D2.2020202@rowantreesoftware.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Joe Shevland wrote:
> 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 ...

This is where I got to (almost) - but it doesn't seem to make any 
difference.

I have tomcat55_java_opts="-Djava.net.preferIPv4Stack=true" in rc.conf.

When that didn't work I tried taking INET6 out of the kernel completely.

Then I took all ipv6 references out of the hosts file (I'm getting 
desperate, you can see).

I still consistently get the following in the logs (everything starts 
fine until this point).

SEVERE: StandardServer.await: create[8005]:
java.net.BindException: Can't assign requested address
         at java.net.PlainSocketImpl.socketBind(Native Method)
         at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
         at java.net.ServerSocket.bind(ServerSocket.java:319)
         at java.net.ServerSocket.<init>(ServerSocket.java:185)
         at 
org.apache.catalina.core.StandardServer.await(StandardServer.java:343
         at org.apache.catalina.startup.Catalina.await(Catalina.java:600)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:560)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

There are definitely no services running on that port (netstat 
confirms...) and the error seems consistent with other encountering the 
ipv6 problems.

I'm not sure what I'm doing wrong, but I'm prepared to accept that it's 
something dumb.

Thanks
Richard



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44742E1F.4050207>