Hello,
I’m trying to upgrade from 8.9 to 9.9, it’s a sonarqube enterprise version, I’m running it on windows server 2019, with openjdk 17 and sql server 2019.
I followed the upgrade documentation to the letter, everything was fine, but when I tried to start the windows service to launch the upgrade, I’m facing an issue, I’m experiencing the following error :
2024-04-19 11:07:10,487 DEBUG - Starting WinSW in service mode
2024-04-19 11:07:10,549 INFO - Starting C:\Program Files\Microsoft\jdk-17.0.10.7-hotspot\bin -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.4.87374.jar" "org.sonar.application.App"
2024-04-19 11:07:10,565 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)
I have the same error in the event viewer.
I already have tried to:
- define a “log on” admnistrator account on the service : same result
- define “run this program as admnistrator” on SonarServiceWrapper.exe: same result
- given full access to everyone on the sonarqube folder recursively: same result
- deactivate the antivirus on the server: same result
- I have tried to run the command
C:\Program Files\Microsoft\jdk-17.0.10.7-hotspot\bin -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.4.87374.jar
manually: it worked but that doesn’t solve my problem.
From what I see it seems that the SonarServiceWrapper.exe is unable to start a process with the java command, but I cannot figure why.
Can you help me figuring out where I should give more rights so that the windows service can start and continue the upgrade ?
Best regards,
Paul Ferrand