1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
From: Emmanuel Bourg <ebourg@apache.org>
Date: Mon, 16 Jan 2023 23:22:18 +0100
Subject: Fix the exit status when Tomcat terminates because the configuration
is invalid
Bug: https://bz.apache.org/bugzilla/show_bug.cgi?id=62607
---
java/org/apache/catalina/startup/Bootstrap.java | 4 ++++
1 file changed, 4 insertions(+)
--- a/java/org/apache/catalina/startup/Bootstrap.java
+++ b/java/org/apache/catalina/startup/Bootstrap.java
@@ -473,6 +473,10 @@
case "start":
daemon.setAwait(true);
daemon.load(args);
+ if (null == daemon.getServer()) {
+ log.fatal("Cannot start server. Server instance is not configured.");
+ System.exit(1);
+ }
daemon.start();
if (null == daemon.getServer()) {
System.exit(1);
|