]> source.dussan.org Git - sonarqube.git/commitdiff
remove duplicate attempts to stop process which failed to start
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Thu, 5 Sep 2019 08:03:58 +0000 (10:03 +0200)
committerSonarTech <sonartech@sonarsource.com>
Fri, 6 Sep 2019 18:21:05 +0000 (20:21 +0200)
server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java

index ed0712801687619b7f9d8f0e3d2185505d723d52..c61c7296d43aa2370913d2fc82e1490c1ebae844 100644 (file)
@@ -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);
     }
   }