Sonarqube running error

I face some error when I run sonarqube like the below.

OS : Windows 10 Enterprise

Java :
openjdk 18.0.1.1 2022-04-22
OpenJDK Runtime Environment (build 18.0.1.1+2-6)
OpenJDK 64-Bit Server VM (build 18.0.1.1+2-6, mixed mode, sharing)

Sonarqube version : sonarqube-9.6.1.59531

No change about “sonar.properties”
run “D:\infra\sonarqube\bin\windows-x86-64\StartSonar.bat”

================
Starting SonarQube…
2022.09.30 16:36:38 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory D:\infra\sonarqube\temp
2022.09.30 16:36:38 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:57361]
2022.09.30 16:36:38 INFO app[o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [D:\infra\sonarqube\elasticsearch]: C:\infra\jdk-18.0.1.1\bin\java -XX:+UseG1GC -Djava.io.tmpdir=D:\infra\sonarqube\temp -XX:ErrorFile=…/logs/es_hs_err_pid%p.log -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djna.tmpdir=D:\infra\sonarqube\temp -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dio.netty.allocator.numDirectArenas=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j2.formatMsgNoLookups=true -Djava.locale.providers=COMPAT -Dcom.redhat.fips=false -Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=D:\infra\sonarqube\elasticsearch -Des.path.conf=D:\infra\sonarqube\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2022.09.30 16:36:38 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
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:416)
at org.elasticsearch.bootstrap.Security.setSecurityManager(Security.java:99)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:70)
2022.09.30 16:36:40 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2022.09.30 16:36:40 INFO app[o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2022.09.30 16:36:40 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped

Hi @ji1000

Sonarqube does not support running with Java 18. As per the requirements it needs Java 11

https://docs.sonarqube.org/latest/requirements/requirements/#header-3

Hope that helps

1 Like