Need some help with upgrade - from 7.3 to 7.9.1 LTS (throws start-limit-hit error)

I have followed https://docs.sonarqube.org/latest/setup/upgrading/ and https://docs.sonarqube.org/latest/setup/upgrade-notes/

I tried upgrading directly from 7.3 to 7.9.1 LTS, hope there isn’t any LTS in between ?
SonarQube is running as a service, and I have replaced 7.3 to 7.9.1 in the etc/systemd/system/sonarqube.service file

The errors when I try starting up the new server are:
shakir@sonarQubeServer:~$ sudo systemctl start sonarqube

shakir@sonarQubeServer:~$ sudo systemctl status sonarqube.service
● sonarqube.service - SonarQube service
Loaded: loaded (/etc/systemd/system/sonarqube.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Wed 2019-08-21 07:08:31 UTC; 11min ago
Process: 13259 ExecStop=/opt/sonarqube/sonarqube-7.9.1/bin/linux-x86-64/sonar.sh stop (code=exited, status=0/SUCCESS)
Process: 13192 ExecStart=/opt/sonarqube/sonarqube-7.9.1/bin/linux-x86-64/sonar.sh start (code=exited, status=0/SUCCESS

Aug 21 07:08:31 sonarQubeServer systemd[1]: Started SonarQube service.
Aug 21 07:08:31 sonarQubeServer systemd[1]: sonarqube.service: Service hold-off time over, scheduling restart.
Aug 21 07:08:31 sonarQubeServer systemd[1]: sonarqube.service: Scheduled restart job, restart counter is at 5.
Aug 21 07:08:31 sonarQubeServer systemd[1]: Stopped SonarQube service.
Aug 21 07:08:31 sonarQubeServer systemd[1]: sonarqube.service: Start request repeated too quickly.
Aug 21 07:08:31 sonarQubeServer systemd[1]: sonarqube.service: Failed with result ‘start-limit-hit’.
Aug 21 07:08:31 sonarQubeServer systemd[1]: Failed to start SonarQube service.
Aug 21 07:08:31 sonarQubeServer systemd[1]: sonarqube.service: Service hold-off time over, scheduling restart.
Aug 21 07:08:31 sonarQubeServer systemd[1]: sonarqube.service: Scheduled restart job, restart counter is at 5.
Aug 21 07:08:31 sonarQubeServer systemd[1]: Stopped SonarQube service.
Aug 21 07:08:31 sonarQubeServer systemd[1]: sonarqube.service: Start request repeated too quickly.
Aug 21 07:08:31 sonarQubeServer systemd[1]: sonarqube.service: Failed with result ‘start-limit-hit’.
Aug 21 07:08:31 sonarQubeServer systemd[1]: Failed to start SonarQube service.

The wrapper configuration is exactly the same
shakir@sonarQubeServer:/opt/sonarqube$ diff sonarqube-7.3/conf/wrapper.conf sonarqube-7.9.1/conf/wrapper.conf

SonarQube I think has now started, after adding Restart=on-failure instead of always

shakir@sonarQubeServer:~$ sudo cat /etc/systemd/system/sonarqube.service | grep Restart
#Restart=always
Restart=on-failure

shakir@sonarQubeServer:~$ sudo systemctl status sonarqube
● sonarqube.service - SonarQube service
   Loaded: loaded (/etc/systemd/system/sonarqube.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Wed 2019-08-21 08:59:17 UTC; 15min ago
  Process: 21976 ExecStop=/opt/sonarqube/sonarqube-7.9.1/bin/linux-x86-64/sonar.sh stop (code=exited, status=0/SUCCESS)
  Process: 21909 ExecStart=/opt/sonarqube/sonarqube-7.9.1/bin/linux-x86-64/sonar.sh start (code=exited, status=0/SUCCESS)

Aug 21 08:59:17 sonarQubeServer systemd[1]: Starting SonarQube service...
Aug 21 08:59:17 sonarQubeServer sonar.sh[21909]: Starting SonarQube...
Aug 21 08:59:17 sonarQubeServer sonar.sh[21909]: Failed to start SonarQube.
Aug 21 08:59:17 sonarQubeServer systemd[1]: Started SonarQube service.

But I can’t access the webserver on GUI or CURL

shakir@sonarQubeServer:~$ curl localhost:9000
curl: (7) Failed to connect to localhost port 9000: Connection refused

There is this phrase in the service status too - Active: inactive (dead)

Have you checked out the Troubleshooting documentation?

Jus checked, there is a single log file

shakir@sonarQubeServer:~$ cat /opt/sonarqube/sonarqube-7.9.1/logs/sonar.log
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.


WrapperSimpleApp: Encountered an error running main: java.lang.IllegalStateException: SonarQube requires Java 11+ to run
java.lang.IllegalStateException: SonarQube requires Java 11+ to run
        at org.sonar.application.App.checkJavaVersion(App.java:93)
        at org.sonar.application.App.start(App.java:56)
        at org.sonar.application.App.main(App.java:98)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
        at java.lang.Thread.run(Thread.java:748)
<-- Wrapper Stopped

But Java is already 11+

shakir@sonarQubeServer:~$ java -version
openjdk version "11.0.4" 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3)
OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3, mixed mode, sharing)

Just checked this – SonerQube doesnt start

shakir@sonarQubeServer:/opt/sonarqube$ sudo cat sonarqube-7.9.1/conf/wrapper.conf | grep wrapper.java.command
#wrapper.java.command=/path/to/my/jdk/bin/java
wrapper.java.command=java
shakir@sonarQubeServer:/opt/sonarqube$ which java
/usr/bin/java

I removed the contents of the sonar.log(as it does not have a timestamp, I thought it might be something old when java8 was thr) file, tried starting sonarqube again, now I dont see any log, however the service is still inactive and the webserver doesnt start on port 9000

Check that the sonarqube directory is assigned by the user you created, if it does not have it, execute these commands

chown -R sonar:sonar /opt/sonarqube

and don’t forget to change the sonar.sh file
RUN_AS_USER=sonar

for more information: