diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2019-09-05 10:03:58 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-09-06 20:21:05 +0200 |
commit | 705dae5d113eb2d3acf2f0387e9779af701cf47b (patch) | |
tree | b66fb9b7bc163fd6ac310be1b361e994fb5d1aac /server/sonar-main | |
parent | a05a09de9fc16b7d33e886e399853290ae24a2f0 (diff) | |
download | sonarqube-705dae5d113eb2d3acf2f0387e9779af701cf47b.tar.gz sonarqube-705dae5d113eb2d3acf2f0387e9779af701cf47b.zip |
remove duplicate attempts to stop process which failed to start
Diffstat (limited to 'server/sonar-main')
-rw-r--r-- | server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java b/server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java index ed071280168..c61c7296d43 100644 --- a/server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java +++ b/server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java @@ -192,8 +192,12 @@ public class SchedulerImpl implements Scheduler, ManagedProcessEventListener, Pr return processLauncher.launch(command); }); } catch (RuntimeException e) { - // failed to start command -> stop everything - hardStop(); + // failed to start command -> do nothing + // the process failing to start will move directly to STOP state + // this early stop of the process will be picked up by onProcessStop (which calls hardStopAsync) + // through interface ProcessLifecycleListener#onProcessState implemented by SchedulerImpl + LOG.trace("Failed to start process [{}] (currentThread={})", + processHandler.getProcessId().getKey(), Thread.currentThread().getName(), e); } } |