From owner-freebsd-java@FreeBSD.ORG Tue May 30 09:18:28 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 DA83016A65D for ; Tue, 30 May 2006 09:18:28 +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 2534B43D53 for ; Tue, 30 May 2006 09:18:25 +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 k4U9Ha4x053728 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for ; Tue, 30 May 2006 10:17:39 +0100 (BST) (envelope-from ric@jonnycalcutta.com) Message-ID: <447C0DE0.3040104@jonnycalcutta.com> Date: Tue, 30 May 2006 10:18:24 +0100 From: Richard Cooper User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: freebsd-java@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Still having the same Tomcat problem 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: Tue, 30 May 2006 09:18:44 -0000 Hi, I've posted a couple of times about a java.net.BindException on port 8005. I'm running 6.1-STABLE. I've added tomcat55_java_opts="-Djava.net.preferIPv4Stack=true" into rc.conf. I've rebuilt the kernel without INET6 support and I've tried all the helpful suggestion posted (even tried putting export JAVA_OPTIONS="-Djava.net.preferIPv4Stack=true" in the tomcat55 file in /usr/local/etc/rc.d). I still get the same problem with binding to port 8005. I'm going to post the full stdout.log message in the hope that it might help someone spot what I am doing wrong. May 30, 2006 9:59:24 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Portable Runtime which allows optimal performance in production environments was not found on the java.library.path: /usr/local/diablo-jdk1.5.0/jre/lib/i386/server:/usr/local/diablo-jdk1.5.0/jre/lib/i386:/usr/local/diablo-jdk1.5.0/jre/../lib/i386:/usr/lib:/usr/local/lib May 30, 2006 9:59:24 AM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8180 May 30, 2006 9:59:24 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1093 ms May 30, 2006 9:59:25 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina May 30, 2006 9:59:25 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.12 May 30, 2006 9:59:25 AM org.apache.catalina.core.StandardHost start INFO: XML validation disabled May 30, 2006 9:59:26 AM org.apache.catalina.core.ApplicationContext log INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] May 30, 2006 9:59:26 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() May 30, 2006 9:59:26 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() May 30, 2006 9:59:26 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() May 30, 2006 9:59:26 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() May 30, 2006 9:59:27 AM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8180 May 30, 2006 9:59:27 AM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 May 30, 2006 9:59:27 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/48 config=null May 30, 2006 9:59:27 AM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource May 30, 2006 9:59:27 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 2710 ms May 30, 2006 9:59:27 AM org.apache.catalina.core.StandardServer await 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.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 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) Everything seems to start until it can't bind the shutdown port, when it fails. I'm very new to this Java/Tomcat stuff though so its hard to be sure. I'm also running Apache 2.2 and mod_jk, if that could make any difference. Obviously though, mod_jk can't bind to anything since Tomcat doesn't start. I'm going to be setting this up on a production server soon for some developers, but obviously not if it doesn't work. Also would I be better just going back to the old Linux port? We're anticipating a heavy load so obviously native binaries would be better. Thanks for any help on this - as I said I'm a newbie to Java/Tomcat so please don't feel that any answer is too obvious ;). Cheers Ric