Upgrade to Sonarqube 9.9 from 8.9.10

Make sure to tell us:

  • What version are you upgrading from? Upgrading from 8.9.10.61524
  • System information (Operating system, Java version, Database provider/version) Windows /Java 17, Microsoft SQL Express 2017
  • What’s the issue you’re facing?
    When trying to upgrade we couldn’t start new service from cmd prompt 9.9. so we used sc delete SonarQube which deleted the service…

Then we were able to install new service, how ever getting below error failed to start the service - Access Denied

Though CMD prompt says its started succesfully how ever service is not started and we saw this in Sonarqube/logs/ SonarServiceWrapper.wrapper.log file

Starting C:\Program Files\Java\jdk-17  -Xms8m -Xmx32m -Djava.awt.headless=true --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.lang=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 -cp "..\..\..\lib\sonar-application-9.9.1.69595.jar" "org.sonar.application.App" 

2023-08-18 10:01:34,191 ERROR - Failed to start service.

System.ComponentModel.Win32Exception (0x80004005): Access is denied

   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)

   at WinSW.Util.ProcessHelper.StartProcessAndCallbackForExit(Process processToStart, String executable, String arguments, Dictionary`2 envVars, String workingDirectory, Nullable`1 priority, ProcessCompletionCallback callback, LogHandler logHandler, Boolean hideWindow)

   at WinSW.WrapperService.StartProcess(Process processToStart, String arguments, String executable, LogHandler logHandler)

   at WinSW.WrapperService.DoStart()

   at WinSW.WrapperService.OnStart(String[] args)

Hi,

Welcome to the community!

Access is denied is a permissions error. At a guess (there aren’t a lot of details here) you need to make sure the user running the 9.9 service has full permissions to the $SONARQUBE-HOME directory, recursive.

 
HTH,
Ann

Hi Ann… we rolled back to 8.9 and reinstalled following same steps and it worked… getting below error now on our build pipeline

##[error]java.lang.UnsupportedClassVersionError: org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

java.lang.UnsupportedClassVersionError: org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

##[error]at java.lang.ClassLoader.defineClass1(Native Method)

Hi,

Sorry I didn’t remember this sooner. There was a change to running SonarQube as a service between 8.9 and 9.9. I’ve linked you to a subsection, but you probably want to read the whole ‘LTS to LTS release upgrade notes’ document.

Regarding your new error, it’s telling you there’s an incompatibility with the version of Java.

I urge you to read the upgrade notes and re-upgrade.

 
Ann