Sonarqube Enterprise 9.9.2 Docker Container periodic restarts in Azure App service

Which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
sonarqube:9.9.2-enterprise Image without additional modifications

How is SonarQube deployed: zip, Docker, Helm
Docker Container using Azure App service B2 and Azure SQL DB

As you can see here, based on the average Memory usage, the restarts appear somwehat periodically at pretty much exactly 40mins apart

From the logs, it seems as if the compute Engine is being started even though it is running:
2023.09.21 08:04:59 INFO ce[o.s.ce.app.CeServer] Compute Engine is started
2023.09.21 08:44:45 INFO ce[o.s.p.ProcessEntryPoint] Starting Compute Engine
ce.log (10.5 KB)

In the es.log there is an exception thrown in the mean time
2023.09.21 08:40:30 ERROR es[o.e.b.ElasticsearchUncaughtExceptionHandler] uncaught exception in thread [Thread-2]
java.io.UncheckedIOException: java.nio.file.NoSuchFileException: /opt/sonarqube/data/es7/nodes/0/_state/_cp2.cfs
es.log (15.0 KB)

Which is preceded by this exception in the web.log
2023.09.21 08:40:29 WARN web[o.s.p.ProcessEntryPoint] Fail to start Web Server
java.lang.IllegalStateException: Fail to create or clean-up directory /opt/sonarqube/data/web/deploy
at org.sonar.server.app.TomcatContexts.addStaticDir(TomcatContexts.java:84)
at org.sonar.server.app.TomcatContexts.configure(TomcatContexts.java:59)
at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:67)
at org.sonar.server.app.WebServer.start(WebServer.java:55)
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:97)
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:81)
at org.sonar.server.app.WebServer.main(WebServer.java:104)
Caused by: java.nio.file.DirectoryNotEmptyException: /opt/sonarqube/data/web/deploy/plugins/abap
web.log (3.9 KB)

Hi,

Welcome to the community!

SonarQube doesn’t start itself. You’ve got something within SonarQube causing a shutdown and another process starting it back up.

Regarding your logs, I see a shutdown at 8:40. It looks like some other process is moving SonarQube’s cheese (files & file permissions):

web.log:

2023.09.21 08:40:29 WARN  web[][o.s.p.ProcessEntryPoint] Fail to start Web Server
java.lang.IllegalStateException: Fail to create or clean-up directory /opt/sonarqube/data/web/deploy

es.log

2023.09.21 08:40:30 ERROR es[][o.e.b.ElasticsearchUncaughtExceptionHandler] uncaught exception in thread [Thread-2]
java.io.UncheckedIOException: java.nio.file.NoSuchFileException: /opt/sonarqube/data/es7/nodes/0/_state/_cp2.cfs

ce.log

2023.09.21 08:40:30 ERROR es[][o.e.b.ElasticsearchUncaughtExceptionHandler] uncaught exception in thread [Thread-2]
java.io.UncheckedIOException: java.nio.file.NoSuchFileException: /opt/sonarqube/data/es7/nodes/0/_state/_cp2.cfs

It looks like you need to figure out what’s messing with /opt/sonarqube/data/* and stop it.

 
HTH,
Ann