From owner-freebsd-java@FreeBSD.ORG Wed May 24 09:58:02 2006 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C409716A4C6 for ; Wed, 24 May 2006 09:58:02 +0000 (UTC) (envelope-from ric@jonnycalcutta.com) Received: from home.jonnycalcutta.com (cpc2-ruth2-0-0-cust133.renf.cable.ntl.com [82.11.56.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A56C43D45 for ; Wed, 24 May 2006 09:58:01 +0000 (GMT) (envelope-from ric@jonnycalcutta.com) Received: from [10.0.0.5] ([10.0.0.5]) (authenticated bits=0) by home.jonnycalcutta.com (8.13.4/8.13.4) with ESMTP id k4O9v93O048505 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for ; Wed, 24 May 2006 10:57:13 +0100 (BST) (envelope-from ric@jonnycalcutta.com) Message-ID: <44742E1F.4050207@jonnycalcutta.com> Date: Wed, 24 May 2006 10:57:51 +0100 From: Richard Cooper User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: freebsd-java@freebsd.org 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> In-Reply-To: <4473B0D2.2020202@rowantreesoftware.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: IPV6 Tomcat problems (Was Re: Connecting to Jetty) X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2006 09:58:03 -0000 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.(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