Sonarqube service crashes at times automatically and so our builds fails

Our Sonarqube is hosted on Centos7 and with jdk8 running on it. We are facing a critical issue where our sonar service keep crashing once in a day or two making production jenkins build failure. Once we restart service it starts working again for rest of the day.

INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:84)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:71)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:71)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:67)
at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:218)
at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:156)
at org.sonarsource.scanner.cli.Main.execute(Main.java:74)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
at org.sonarsource.scanner.api.internal.Jars.getBootstrapIndex(Jars.java:100)
at org.sonarsource.scanner.api.internal.Jars.getScannerEngineFiles(Jars.java:76)
at org.sonarsource.scanner.api.internal.Jars.download(Jars.java:70)
at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:39)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:75)
… 8 more
Caused by: java.net.ConnectException: Failed to connect to alis-sonarq01/10.245.128.85:8080
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connectSocket(RealConnection.java:222)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connect(RealConnection.java:146)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:186)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:121)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.

Attaching logs. Please help me fixing it.

sonar.log (5.6 KB)

Hey there.

SonarQube v6.7 LTS is EOL and I’d recommend you start working on an upgrade to v7.9 LTS!

You’ve attached the sonar.log file, but there should be many log files in your logs directory. I would recommend checking them to see if any hold additional clues. ce.log might be revealinig, as it seems to be the process that stops first.

2020.05.23 00:17:23 WARN  app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [ce]: 134
2020.05.23 00:17:23 INFO  app[][o.s.a.SchedulerImpl] Process [ce] is stopped
2020.05.23 00:17:23 WARN  app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [ce]: 134
2020.05.23 00:17:23 INFO  app[][o.s.a.SchedulerImpl] Process [ce] is stopped

If you have to manually restart it, I’m not sure you’ve really got it setup as a service (which ideally would restart itself if it stops unexpectedly). Maybe something to look into

Hi,

@Colin Sure we will consider upgrading once we fix this. We are running sonar as a service but due to some reason it does not start after shut down unexpectedly.

We also see some Error statements in CE log and also JVM crash creating some files which I am attaching here.

hs_err_pid42345.log (74.2 KB)

Thanks