Due to Catalina startup logic, server startup in illegal state is possible. For expamle, the concurrent process takes the socket in use, because of sysadmin error, or something else. We started server, the server ignored the socket binding error, startup succes, but isn't working yet. In my opinion, the "system errors" (sockets, filesystems,...etc) should abort the startup process, to ensure the server was started in right state. If server silently ignores the errors, the sysadmin can miss the error, and production system can be broken. Socket binding error example: .... [2010-01-26 19:09:26] [main ERROR coyote.http11.Http11Protocol] - Error starting endpoint java.net.BindException: Address already in use: JVM_Bind /0.0.0.0:8001 at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:511) at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:526) at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:203) .... See Catalina.java:585 public void start() { .... if (server instanceof Lifecycle) { try { ((Lifecycle) server).start(); } catch (LifecycleException e) { log.error("Catalina.start: ", e); // !!!! exception ignored !!!!!!, server continued to start in broken state } } .... log.info("Server startup in " + ((t2 - t1) / 1000000) + " ms"); }
This was feature was implemented in Tomcat 7 some time ago. I have proposed back porting it to 6.0.x
The patch has been applied to trunk and will be included in 6.0.25 onwards.