Sonarqube service not starting . it will fail few seconds after starting the service

sonarqube version : latest
java : 11.0

9.9 LTS version needs java 17

upgraded java to 17 but issue not resolved . still facing issue in starting sonarqube service

Well what do the logs say?

1 Like

2023.02.27 15:41:22 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2023.02.27 15:41:22 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:12218]
2023.02.27 15:41:22 INFO app[o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2023.02.27 15:41:22 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.02.27 15:41:31 INFO app[o.s.a.SchedulerImpl] Process[es] is up
2023.02.27 15:41:31 INFO app[o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/opt/sonarqube]: /usr/lib/jvm/java-11-openjdk-11.0.18.0.10-1.el7_9.x86_64/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.|[::1] -cp ./lib/sonar-application-9.6.1.59531.jar:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.4.0.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process6517954298541565750properties
2023.02.27 15:41:33 INFO app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.02.27 15:41:33 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2023.02.27 15:41:33 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.02.27 15:41:33 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
2023.02.27 16:12:42 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2023.02.27 16:12:42 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:18132]
2023.02.27 16:12:42 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2023.02.27 16:12:42 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.02.27 16:12:50 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2023.02.27 16:12:50 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/opt/sonarqube]: /usr/lib/jvm/java-11-openjdk-11.0.18.0.10-1.el7_9.x86_64/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.
|[::1] -cp ./lib/sonar-application-9.6.1.59531.jar:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.4.0.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process8223019444901531602properties
2023.02.27 16:12:52 INFO app[o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.02.27 16:12:52 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2023.02.27 16:12:52 INFO app[o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.02.27 16:12:52 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
2023.02.27 16:24:57 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2023.02.27 16:24:57 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:25712]
2023.02.27 16:24:57 INFO app[o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2023.02.27 16:24:57 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.02.27 16:25:04 INFO app[o.s.a.SchedulerImpl] Process[es] is up
2023.02.27 16:25:04 INFO app[o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/opt/sonarqube]: /usr/lib/jvm/java-11-openjdk-11.0.18.0.10-1.el7_9.x86_64/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-9.6.1.59531.jar:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.4.0.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process13937117611520580977properties
2023.02.27 16:25:06 INFO app[o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.02.27 16:25:06 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2023.02.27 16:25:06 INFO app[o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.02.27 16:25:06 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped

And the other log files? There should be at least two files in the logs directory called web.log and es.log which are interesting

Also please format the logs with markdown in your post as else this gets really hard to read

this is the main error we are facing

The systemd service is something independent from the sonar.sh script.
Also again please check the logs directory in your sonarqube installation folder and share these logs.

Apart from that I noticed one additional thing:

Didn’t you say that you updated to Java 17?

1 Like