Sonarqube service keeps stopping on windows

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    10.4 Sonarqube
  • how is SonarQube deployed: zip, Docker, Helm
    Zip install on Windows Server 2022
  • what are you trying to achieve
    Successful installation
  • what have you tried so far to achieve this

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hi,
I am trying to setup Sonarqube. When I start the server, I get this warning:


C:\Sonarqube\bin\windows-x86-64>.\StartSonar.bat
Starting SonarQube...
2024.03.28 15:59:18 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Sonarqube\temp
2024.03.28 15:59:18 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:51009]
2024.03.28 15:59:18 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [C:\Sonarqube\elasticsearch]: C:\Program Files\Java\jdk-17\bin\java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=./bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=C:\Sonarqube\elasticsearch -Des.path.conf=C:\Sonarqube\temp\conf\es -Des.distribution.type=tar -cp C:\Sonarqube\elasticsearch\lib\*;C:\Sonarqube\elasticsearch\lib\cli-launcher\* org.elasticsearch.launcher.CliToolLauncher
2024.03.28 15:59:18 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.03.28 15:59:41 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2024.03.28 15:59:41 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [C:\Sonarqube]: C:\Program Files\Java\jdk-17\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\Sonarqube\temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=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 -Dcom.redhat.fips=false -Xmx1G -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-10.4.1.88267.jar;C:\Sonarqube\lib\jdbc\mssql\mssql-jdbc-12.4.2.jre11.jar org.sonar.server.app.WebServer C:\Sonarqube\temp\sq-process4407305439053845856properties
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.sonar.process.PluginSecurityManager (file:/C:/Sonarqube/lib/sonar-application-10.4.1.88267.jar)
WARNING: Please consider reporting this to the maintainers of org.sonar.process.PluginSecurityManager
WARNING: System::setSecurityManager will be removed in a future release
2024.03.28 15:59:52 INFO  app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2024.03.28 15:59:52 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2024.03.28 15:59:52 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

And the process stops.

Could you help?

Hi,

What do your server logs say?

 
Ann

Hi,

So I didn’t install the sql driver. Now done, and get this error

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:aebe75aa-86c0-4bb5-8f1b-ceb2b9e09405 at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:4026)

Actually, that is fixed. Errow now is:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@659e0bfd-org.sonar.server.platform.DatabaseServerCompatibility': Initialization of bean failed; nested exception is The version of SonarQube is too old. Please upgrade to the Long Term Support version first.

Note, I am using an existing database that was from 9.5

Hi,

The new error means pretty much what it says. You can’t upgrade directly from 9.5 to 10.4 because there’s an LTA version in between. Your upgrade path is:

9.5 → 9.9.4 → 10.4

 
HTH,
Ann

Is 9.9.4 eligible to upgrade to 10.4? As the docs say 9.9 > 10.1

Hi,

Yes. But why would you want to stop at 10.1? Why not go directly to the latest version?

 
Ann

That was on your documentation. I saw it somewhere regarding upgrade paths.

However, in the interest of time, I have done a clean install of 10.4 :slight_smile: I did have some projects, but they will get recreated in my CICD process.

1 Like