Sonar Server fails to start

When trying to start a SOnar server, I’m getting the following message and it stops:

2023.06.15 22:45:28 INFO app[o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [C:\sonarqube]: C:\Program Files\Java\jdk-20\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 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-10.0.0.68432.jar;C:\sonarqube\lib\jdbc\postgresql\postgresql-42.5.1.jar org.sonar.server.app.WebServer C:\sonarqube\temp\sq-process12614802122204248452properties
Exception in thread “main” java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
at java.base/java.lang.System.setSecurityManager(System.java:429)
at org.sonar.process.PluginSecurityManager.restrictPlugins(PluginSecurityManager.java:42)
at org.sonar.server.app.WebSecurityManager.apply(WebSecurityManager.java:47)
at org.sonar.server.app.WebServer.main(WebServer.java:101)
2023.06.15 22:45:28 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [Web Server]: 1
2023.06.15 22:45:28 INFO app[o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.06.15 22:45:28 INFO app[o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.06.15 22:45:28 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped

I’m using the latest version of SonarQube. What’s wrong and how can I fix it? Thanks.

Welcome :slight_smile:

Sonarqube needs to run on Java 17 for version >= 9.9.x
It seems it doesn’t run on Java 20, try with Java 17 instead.

Gilbert

Thanks for the reply. I did change it, and now I’m getting this:

2023.06.15 23:24:46 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 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-10.0.0.68432.jar;C:\sonarqube\lib\jdbc\postgresql\postgresql-42.5.1.jar org.sonar.server.app.WebServer C:\sonarqube\temp\sq-process7663351846745781266properties
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.0.0.68432.jar)
WARNING: Please consider reporting this to the maintainers of org.sonar.process.PluginSecurityManager
WARNING: System::setSecurityManager will be removed in a future release
2023.06.15 23:24:49 INFO app[o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.06.15 23:24:49 INFO app[o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.06.15 23:24:49 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped

Ok, got it working. The problem was the database connection.

1 Like

Glad you’ve nailed it. In case of trouble increase the loglevel in $SONARQUBE_HOME/conf/sonar.properties via sonar.log.level=DEBUG

Then post the logs under $SONARQUBE_HOME/log with the sensitive parts redacted.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.