Unable to start sonarqube service after upgrade

Make sure to tell us:

  • What version are you upgrading from?
  • Developer Edition Version 9.7.1 to sonarqube-developer-9.9.1.69595
  • System information (Operating system, Java version, Database provider/version)
    Debian, openjdk version “11.0.18”, DB cluster is running aurora-postgresql version 11.17
  • What’s the issue you’re facing?
    I’m not able to start the sonarqube service after the upgrade. Error as below.

systemctl status sonarqube

sonarqube.service - SonarQube service

Loaded: loaded (/etc/systemd/system/sonarqube.service; enabled; vendor preset: enabled)

Active: failed (Result: exit-code) since Thu 2023-08-03 04:27:54 UTC; 54min ago

Process: 1591309 ExecStart=/bin/nohup /usr/bin/java -Xms32m -Xmx32m -Djava.net.preferIPv4Stack=true -jar /srv/sonar/lib/sonar-application-9.9.1.69>

Main PID: 1591309 (code=exited, status=1/FAILURE)

   CPU: 301ms

Aug 03 04:27:54 ip-10-16-32-104 systemd[1]: sonarqube.service: Scheduled restart job, restart counter is at 5.

Aug 03 04:27:54 ip-10-16-32-104 systemd[1]: Stopped SonarQube service.

Aug 03 04:27:54 ip-10-16-32-104 systemd[1]: sonarqube.service: Start request repeated too quickly.

Aug 03 04:27:54 ip-10-16-32-104 systemd[1]: sonarqube.service: Failed with result ‘exit-code’.

Aug 03 04:27:54 ip-10-16-32-104 systemd[1]: Failed to start SonarQube service

thanks in advance for the help.

SonarQube v9.9 LTS requires a Java 17 runtime.

thank you.will give it a try.

Hi,
I’ve upgraded the Java but still not able to start the service. error as below.

sonarqube.service - SonarQube service
Loaded: loaded (/etc/systemd/system/sonarqube.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2023-08-03 04:27:54 UTC; 54min ago
Process: 1591309 ExecStart=/bin/nohup /usr/bin/java -Xms32m -Xmx32m -Djava.net.preferIPv4Stack=true -jar /srv/sonar/lib/sonar-application-9.9.1.69>
Main PID: 1591309 (code=exited, status=1/FAILURE)
CPU: 301ms

Aug 03 04:27:54 ip-10-16-32-104 systemd[1]: sonarqube.service: Scheduled restart job, restart counter is at 5.
Aug 03 04:27:54 ip-10-16-32-104 systemd[1]: Stopped SonarQube service.
Aug 03 04:27:54 ip-10-16-32-104 systemd[1]: sonarqube.service: Start request repeated too quickly.
Aug 03 04:27:54 ip-10-16-32-104 systemd[1]: sonarqube.service: Failed with result ‘exit-code’.
Aug 03 04:27:54 ip-10-16-32-104 systemd[1]: Failed to start SonarQube service.

Some additional logs from sonar.log

    ... 9 common frames omitted

Caused by: java.io.IOException: error=13, Permission denied
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:314)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
… 12 common frames omitted
2023.08.09 04:22:50 INFO app[o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.08.09 04:22:50 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.08.09 04:22:50 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped

You may want to try a chown -R of the directory to make sure that your user has permissions.

1 Like

thank you Colin.