You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "chickenlj (GitHub)" <gi...@apache.org> on 2019/01/15 09:36:59 UTC

[GitHub] [incubator-dubbo] chickenlj commented on issue #3236: Why does not tomcat throw an exception when `server.start` failed with a socket binding error.

```java
try {
                    connector.init();
                } catch (Exception var9) {
                    String message = sm.getString("standardService.connector.initFailed", new Object[]{connector});
                    log.error(message, var9);
                    if (Boolean.getBoolean("org.apache.catalina.startup.EXIT_ON_INIT_FAILURE")) {
                        throw new LifecycleException(message);
                    }
                }
```

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.

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3236 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org