Sonarqube crashing frequently (stops, restarts, stops, goes into a loop)

I have been trying to install sonarqube on ubuntu 22.04.1 LTS on the AWS EC2 instance and have followed the following doc, everything went well but the app didn’t work.
How to Use SonarQube on Ubuntu 22.04 LTS - Vultr.com.

When checking into the logs I found the below details:

root@ip-172-31-28-119:/opt/sonarqube/logs# sudo tail -f sonar.log
2023.03.20 19:30:23 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2023.03.20 19:30:23 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/opt/sonarqube]: /usr/lib/jvm/java-17-openjdk-amd64/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](http://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](http://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 -server -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-process17799810221528970832properties
2023.03.20 19:30:29 INFO app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.03.20 19:30:29 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2023.03.20 19:30:29 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.03.20 19:30:29 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
2023.03.20 19:30:30 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2023.03.20 19:30:30 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: [127.0.0.1:9001](http://127.0.0.1:9001/), TCP: [127.0.0.1:45705](http://127.0.0.1:45705/)]
2023.03.20 19:30:30 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2023.03.20 19:30:30 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.03.20 19:30:42 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2023.03.20 19:30:42 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/opt/sonarqube]: /usr/lib/jvm/java-17-openjdk-amd64/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](http://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](http://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 -server -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-process7574095793335840088properties
2023.03.20 19:30:47 INFO app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.03.20 19:30:47 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [
ElasticSearch]: 143
2023.03.20 19:30:47 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.03.20 19:30:47 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
2023.03.20 19:30:48 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2023.03.20 19:30:48 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: [127.0.0.1:9001](http://127.0.0.1:9001/), TCP: [127.0.0.1:46043](http://127.0.0.1:46043/)]
2023.03.20 19:30:48 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2023.03.20 19:30:49 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running

Please help me resolve this as I have spend a lot of time finding a solution but have not found an appropriate solution for it.

Hi,

Welcome to the community!

What do your server logs say?

 
Ann