Bug 48625 - Server started in illegal state
Summary: Server started in illegal state
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 6.0.20
Hardware: PC All
: P2 normal (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2010-01-26 08:30 UTC by Roman Tsirulnikov
Modified: 2010-02-18 10:04 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Roman Tsirulnikov 2010-01-26 08:30:09 UTC
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 /
	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");
Comment 1 Mark Thomas 2010-01-31 03:00:27 UTC
This was feature was implemented in Tomcat 7 some time ago. I have proposed back porting it to 6.0.x
Comment 2 Mark Thomas 2010-02-18 10:04:42 UTC
The patch has been applied to trunk and will be included in 6.0.25 onwards.