Hi
After updating from 8.9 LTS to 9.9 LTS I cannot start SonarQube as a service but it works when launching StartSonar.bat
When launching %SONARQUBE_HOME%\bin\windows-x86-64\StartSonar.bat
as administrator, SonarQube is working as expected as long as the command prompt is active.
Installing the service with %SONARQUBE_HOME%\bin\windows-x86-64\SonarService.bat install
works without a problem and the service is listed as service. Starting the service in the service prompt return immediately an windows error. No SonarQube logs are updated in any case.
When starting the service with %SONARQUBE_HOME%\bin\windows-x86-64\SonarService.bat start
, as administrator, the console just prints
2023-04-12 15:29:00,084 INFO - Starting service 'SonarQube (SonarQube)'...
2023-04-12 15:29:00,209 INFO - Service 'SonarQube (SonarQube)' started successfully.
and the SonarServiceWrapper.wrapper.log shows:
2023-04-12 15:30:03,007 INFO - Starting java.exe -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.0.65466.jar" "org.sonar.application.App"
2023-04-12 15:30:03,023 INFO - Started process 6920
2023-04-12 15:30:03,023 DEBUG - Forwarding logs of the process System.Diagnostics.Process (java) to WinSW.IgnoreLogAppender
No other SonarQube logs gets edited.
When testing the service with %SONARQUBE_HOME%\bin\windows-x86-64\SonarService.bat test
as administrator I get the following result:
2023-04-12 15:31:37,450 INFO - Starting java.exe -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.0.65466.jar" "org.sonar.application.App"
2023-04-12 15:31:37,497 INFO - Started process 1292
2023-04-12 15:31:38,528 INFO - Stopping SonarQube
2023-04-12 15:31:38,607 WARN - Failed to attach to console. Access is denied
2023-04-12 15:31:38,653 INFO - Finished SonarQube
I was not able figuring out what âFailed to attach to console. Access is deniedâ shall explain to me for error handling. Iâm using Java 17 on a windows 2019 server. Any idea what could wenât wrong?