@@ -138,7 +138,7 @@ public class ProcessEntryPoint { | |||
private void stopAsync() { | |||
if (lifecycle.tryToMoveTo(Lifecycle.State.STOPPING)) { | |||
LoggerFactory.getLogger(ProcessEntryPoint.class).info("Stopping process"); | |||
LoggerFactory.getLogger(ProcessEntryPoint.class).info("Gracefully stopping process"); | |||
stopWatcher.stopWatching(); | |||
long terminationTimeoutMs = Long.parseLong(props.nonNullValue(PROPERTY_GRACEFUL_STOP_TIMEOUT_MS)); | |||
stopperThread = new StopperThread(monitored, this::terminate, terminationTimeoutMs); |
@@ -47,6 +47,8 @@ class EmbeddedTomcat { | |||
System.setProperty("org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH", "true"); | |||
System.setProperty("org.apache.catalina.startup.EXIT_ON_INIT_FAILURE", "true"); | |||
// prevent Tomcat from shutting down our logging when stopping | |||
System.setProperty("logbackDisableServletContainerInitializer", "true"); | |||
tomcat = new Tomcat(); | |||
// Initialize directories |
@@ -21,6 +21,7 @@ package org.sonar.server.app; | |||
import com.google.common.collect.ImmutableMap; | |||
import java.io.File; | |||
import org.slf4j.LoggerFactory; | |||
import org.sonar.process.MinimumViableSystem; | |||
import org.sonar.process.Monitored; | |||
import org.sonar.process.ProcessEntryPoint; | |||
@@ -74,6 +75,7 @@ public class WebServer implements Monitored { | |||
public void stop() { | |||
// hard stop is as graceful as stop for the WebServer | |||
hardStop(); | |||
LoggerFactory.getLogger(WebServer.class).info("WebServer stopped"); | |||
} | |||
@Override |
@@ -478,7 +478,7 @@ waitforstop() { | |||
} | |||
stopit() { | |||
echo "Gracefully stopping $APP_LONG_NAME..." | |||
echo "Gracefully stopping $APP_LONG_NAME (can take some time)..." | |||
getpid | |||
if [ "X$pid" = "X" ] | |||
then |
@@ -485,7 +485,7 @@ waitforstop() { | |||
} | |||
stopit() { | |||
echo "Gracefully stopping $APP_LONG_NAME..." | |||
echo "Gracefully stopping $APP_LONG_NAME (can take some time)..." | |||
getpid | |||
if [ "X$pid" = "X" ] | |||
then |