Fixed by adding the bindOnInit parameter to the Tomcat connectors and setting that to false.
On Sun, May 15, 2011 at 3:39 PM, Senaka Fernando <sen...@wso2.com> wrote: > FYI. This is very easy to reproduce. Simply start the server in two > consoles, and you will see that the transports are initialized when the > webapp is getting deployed, much before Carbon has been initialized. > > ./wso2server.sh > JAVA_HOME environment variable is set to /usr/lib/jvm/java-6-sun-1.6.0.20 > CARBON_HOME environment variable is set to > /home/senaka/carbon-trunk/products/greg/modules/distribution/product/target/wso2greg-4.0.0-SNAPSHOT > [2011-05-15 15:36:32,408] INFO {org.wso2.carbon.server.Main} - > Initializing system... > [2011-05-15 15:36:32,608] INFO > {org.wso2.carbon.server.transports.http.HttpTransport} - Created Connector > [HTTP_11_NIO://*:9763] > [2011-05-15 15:36:32,612] INFO > {org.wso2.carbon.server.transports.http.HttpTransport} - Created Connector > [HTTPS_11_NIO://*:9443] > [2011-05-15 15:36:32,709] INFO > {org.wso2.carbon.server.TomcatCarbonWebappDeployer} - Deployed Carbon > webapp: StandardEngine[Tomcat].StandardHost[defaulthost].StandardContext[/] > May 15, 2011 3:36:33 PM org.apache.coyote.AbstractProtocolHandler init > SEVERE: Failed to initialize end point associated with ProtocolHandler > ["http-nio-9763"] > java.net.BindException: Address already in use > at sun.nio.ch.Net.bind(Native Method) > at > sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119) > at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59) > at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:459) > at > org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:483) > at > org.apache.coyote.AbstractProtocolHandler.init(AbstractProtocolHandler.java:345) > at > org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119) > at > org.apache.catalina.connector.Connector.initInternal(Connector.java:910) > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101) > at > org.apache.catalina.core.StandardService.initInternal(StandardService.java:559) > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101) > at > org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:781) > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101) > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:136) > at org.apache.catalina.startup.Tomcat.start(Tomcat.java:305) > at org.wso2.carbon.tomcat.BetterTomcat.start(BetterTomcat.java:71) > at org.wso2.carbon.server.TomcatServer.start(TomcatServer.java:110) > at org.wso2.carbon.server.Main.startServer(Main.java:64) > at org.wso2.carbon.server.Main.start(Main.java:156) > 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:597) > at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:62) > at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:43) > May 15, 2011 3:36:33 PM org.apache.catalina.core.StandardService > initInternal > SEVERE: Failed to initialize connector > [Connector[org.apache.coyote.http11.Http11NioProtocol-9763]] > org.apache.catalina.LifecycleException: Protocol handler initialization > failed > at > org.apache.catalina.connector.Connector.initInternal(Connector.java:912) > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101) > at > org.apache.catalina.core.StandardService.initInternal(StandardService.java:559) > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101) > at > org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:781) > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101) > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:136) > at org.apache.catalina.startup.Tomcat.start(Tomcat.java:305) > at org.wso2.carbon.tomcat.BetterTomcat.start(BetterTomcat.java:71) > at org.wso2.carbon.server.TomcatServer.start(TomcatServer.java:110) > at org.wso2.carbon.server.Main.startServer(Main.java:64) > at org.wso2.carbon.server.Main.start(Main.java:156) > 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:597) > at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:62) > at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:43) > Caused by: java.net.BindException: Address already in use > at sun.nio.ch.Net.bind(Native Method) > at > sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119) > at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59) > at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:459) > at > org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:483) > at > org.apache.coyote.AbstractProtocolHandler.init(AbstractProtocolHandler.java:345) > at > org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119) > at > org.apache.catalina.connector.Connector.initInternal(Connector.java:910) > ... 17 more > May 15, 2011 3:36:33 PM org.apache.coyote.AbstractProtocolHandler init > SEVERE: Failed to initialize end point associated with ProtocolHandler > ["http-nio-9443"] > java.net.BindException: Address already in use > at sun.nio.ch.Net.bind(Native Method) > at > sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119) > at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59) > at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:459) > at > org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:483) > at > org.apache.coyote.AbstractProtocolHandler.init(AbstractProtocolHandler.java:345) > at > org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119) > at > org.apache.catalina.connector.Connector.initInternal(Connector.java:910) > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101) > at > org.apache.catalina.core.StandardService.initInternal(StandardService.java:559) > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101) > at > org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:781) > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101) > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:136) > at org.apache.catalina.startup.Tomcat.start(Tomcat.java:305) > at org.wso2.carbon.tomcat.BetterTomcat.start(BetterTomcat.java:71) > at org.wso2.carbon.server.TomcatServer.start(TomcatServer.java:110) > at org.wso2.carbon.server.Main.startServer(Main.java:64) > at org.wso2.carbon.server.Main.start(Main.java:156) > 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:597) > at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:62) > at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:43) > May 15, 2011 3:36:33 PM org.apache.catalina.core.StandardService > initInternal > SEVERE: Failed to initialize connector > [Connector[org.apache.coyote.http11.Http11NioProtocol-9443]] > org.apache.catalina.LifecycleException: Protocol handler initialization > failed > at > org.apache.catalina.connector.Connector.initInternal(Connector.java:912) > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101) > at > org.apache.catalina.core.StandardService.initInternal(StandardService.java:559) > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101) > at > org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:781) > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101) > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:136) > at org.apache.catalina.startup.Tomcat.start(Tomcat.java:305) > at org.wso2.carbon.tomcat.BetterTomcat.start(BetterTomcat.java:71) > at org.wso2.carbon.server.TomcatServer.start(TomcatServer.java:110) > at org.wso2.carbon.server.Main.startServer(Main.java:64) > at org.wso2.carbon.server.Main.start(Main.java:156) > 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:597) > at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:62) > at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:43) > Caused by: java.net.BindException: Address already in use > at sun.nio.ch.Net.bind(Native Method) > at > sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119) > at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59) > at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:459) > at > org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:483) > at > org.apache.coyote.AbstractProtocolHandler.init(AbstractProtocolHandler.java:345) > at > org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119) > at > org.apache.catalina.connector.Connector.initInternal(Connector.java:910) > ... 17 more > > Thanks, > Senaka. > > -- > *Senaka Fernando* > Product Manager - WSO2 Governance Registry; > Associate Technical Lead; WSO2 Inc.; http://wso2.com* > Member; Apache Software Foundation; http://apache.org > > E-mail: senaka AT wso2.com > **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818 > Linked-In: http://linkedin.com/in/senakafernando > > *Lean . Enterprise . Middleware > > > _______________________________________________ > Carbon-dev mailing list > Carbon-dev@wso2.org > http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev > > -- *Afkham Azeez* Director of Architecture; WSO2, Inc.; http://wso2.com Member; Apache Software Foundation; http://www.apache.org/ * <http://www.apache.org/>** email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919 blog: **http://blog.afkham.org* <http://blog.afkham.org>* twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez> * linked-in: **http://lk.linkedin.com/in/afkhamazeez* * * *Lean . Enterprise . Middleware*
_______________________________________________ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev