ElasticSearch: 1

Hello everyone
I have the following problem to run and start SonarQube in Windows 11. I have already reviewed the installed Java version which is 17.0.10 from Oracle, and I have already configured the respective environment variable “JAVA_HOME”.
This is what it shows me in cmd.exe when I run StartSonar.bat even as administrator:

Starting SonarQube...
2024.02.12 20:48:37 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube-9.9.4.87374\temp 2024.02.12 20:48:37 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:53 879] 2024.02.12 20:48:37 INFO app[][o.s.a. ProcessLauncherImpl] Launch process [ELASTICSSEARCH] from [C:\sonarqube-9.9.4.87374\ elasticsearch]: C:\Program Files\Java\jdk-21\bin\java -XX:+UseG1GC -Djava.io.tmpdir=C: \sonarqube-9.9.4.87374\temp -XX:Er rorFile=C:\sonarqube-9.9.4.87374\logs\es_hs_err_pid %p.log -Des.networkaddress.cache. ttl=60 -Des.networkaddress.cache.neg ative.ttl=10 -XX:+Always PreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djna.tmpdir =C:\ sonarqube-9.9.4.87374\temp -XX:-OmitStackTraceInFast Throw -Dio.netty.noUnsafe=true -Dio.netty.nokeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dio.netty.allocator. numDirectArenas-0 -Dlog4j. shutdownHookEnabled=false -Dlo g4j2.disable.jmx-true -Dlog4j2. formatMsgNoLookups=true -Djava.locale.providers-COMPAT -Dcom.redhat.fips=false -Xmx512m - 4.8 7374\elasticsearch -Des.path.conf=C:\sonarqube-9.9.4.87374\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsea 2024.02.12 20:48:37 INFO app[][ o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
rch
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.elasticsearch.bootstrap.Security.setSecurityManager (Security.java:99)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:70)

And this is what the only log that appears “sonar.log” shows me:

2024.02.12 20:48:37 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube-9.9.4.87374\temp
2024.02.12 20:48:37 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:53879]
2024.02.12 20:48:37 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSSEARCH] from [C:\sonarqube-9.9.4.87374\elasticsearch]: C:\Program Files\Java\jdk-21\bin\java -XX:+UseG1GC -Djava.io.tmpdir=C:\sonarqube-9.9.4.87374\temp -XX:ErrorFile=C:\sonarqube-9.9.4.87374\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=C :\sonarqube-9.9.4.87374\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=C:\sonarqube-9.9.4.87374\elasticsearch -Des.path.conf=C:\sonarqube-9.9.4.87374\temp\conf\es -cp lib/* org.elasticsearch. bootstrap.Elasticsearch
2024.02.12 20:48:37 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.02.12 20:48:38 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2024.02.12 20:48:38 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2024.02.12 20:48:38 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped

Could you help me solve this problem?

Hi,

Welcome to the community!

Are there any other files in your $SONARQUBE-HOME/logs directory?

If so, what do they say?

 
Ann

Hi,

SonarQube doesn’t use the JAVA_HOME to find the java.exe. You’ll need to create a new environment variable SONAR_JAVA_PATH with the full path to the java executable (e.g “C:\Program Files\Java\jdk-11\bin\java.exe”)

1 Like