You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Why does not tomcat throw an exception when server.start failed with a socket binding error. #3236
Turns out that there's a if (Boolean.getBoolean("org.apache.catalina.startup.EXIT_ON_INIT_FAILURE")) check that will decide whether tomcat will throw the exception out. By default, the return value would be false because we haven't set the org.apache.catalina.startup.EXIT_ON_INIT_FAILURE value, so it just skipped the throw action.
Activity
ralf0131 commentedon Jan 15, 2019
Can you provide the error stack trace?
chickenlj commentedon Jan 15, 2019
Turns out that there's a
if (Boolean.getBoolean("org.apache.catalina.startup.EXIT_ON_INIT_FAILURE"))check that will decide whether tomcat will throw the exception out. By default, the return value would be false because we haven't set theorg.apache.catalina.startup.EXIT_ON_INIT_FAILUREvalue, so it just skipped the throw action.chickenlj commentedon Jan 15, 2019
Here's the stack trace:
ralf0131 commentedon Jan 15, 2019
Yes, you need to set
org.apache.catalina.startup.EXIT_ON_INIT_FAILUREto true in order to let Tomcat to fail during initialization.