SonarQube 9.9 doesn't start with Java 19

I have upgraded SonarQube from sonarqube-9.8.0.63668 to sonarqube-9.9.0.65466.
now the service is not starting.
This is the sonar.log file content:

2023.03.14 14:57:38 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory D:\sonarqube-9.9.0.65466\temp
2023.03.14 14:57:38 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:50134]
2023.03.14 14:57:39 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [D:\sonarqube-9.9.0.65466\elasticsearch]: C:\Program Files\Java\jdk-19\bin\java -XX:+UseG1GC -Djava.io.tmpdir=D:\sonarqube-9.9.0.65466\temp -XX:ErrorFile=D:\sonarqube-9.9.0.65466\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:\sonarqube-9.9.0.65466\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 -Des.enforce.bootstrap.checks=true -Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=D:\sonarqube-9.9.0.65466\elasticsearch -Des.path.conf=D:\sonarqube-9.9.0.65466\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2023.03.14 14:57:39 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.03.14 14:57:41 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2023.03.14 14:57:41 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.03.14 14:57:41 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

This is what i get when I use the StartSonar.bat file:

Starting SonarQube...
2023.03.14 14:57:38 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory D:\sonarqube-9.9.0.65466\temp
2023.03.14 14:57:38 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:50134]
2023.03.14 14:57:39 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [D:\sonarqube-9.9.0.65466\elasticsearch]: C:\Program Files\Java\jdk-19\bin\java -XX:+UseG1GC -Djava.io.tmpdir=D:\sonarqube-9.9.0.65466\temp -XX:ErrorFile=D:\sonarqube-.9.0.65466\logs\es_hs_err_pid%p.log -Des.networkaddress.ca
che.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:\sonarqube-.9.0.65466\temp -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -io.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 -Des.enforce.bootstrap.checks=true -Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch-Des.path.home=D:\sonarqube-9.9.0.65466\elasticsearch -Des.path.conf=D:\sonarqub
e-9.9.0.65466\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2023.03.14 14:57:39 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:425)        at org.elasticsearch.bootstrap.Security.setSecurityManager(Security.java:99)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:70)

2023.03.14 14:57:41 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2023.03.14 14:57:41 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.03.14 14:57:41 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

I searched and found that I have to upgrade the Java Runtime. I had Java 1.8 & 11 installed on the machine.
So, I installed Java 19, but the service is not starting.

Can someone help me out on why the ElasticSearch is stopping?

Hi,

Iā€™ve moved your post to a new thread since the thread you resurrected was 2 years old. Per the FAQ, even if you think your topic is related you should create a new thread rather than resurrecting old topics.

And per the docs SonarQube needs Java 17.

Ā 
HTH,
Ann

Thanks I will do that in the future.

1 Like

I will try to install Java 17 and will let you know the outcome.

Hi Ann,

Thank you very much.
The server started with Java 17.
I faced another issue with MSSQL authentication but fixed it by adding the mssql-jdbc_auth-11.2.2.x64.dll to the Java 17 Bin folder.

Thanks again.

1 Like