SonarQube is not starting, error message

Can anyone help me with the below issue. This is the first time I am trying to run Sonarqube

--> Wrapper Started as Console
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

2022.06.28 20:23:47 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Program Files\sonarqube-9.5.0.56709\temp
2022.06.28 20:23:47 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:51828]
2022.06.28 20:23:47 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [C:\Program Files\sonarqube-9.5.0.56709\elasticsearch]: C:\Users\shashi\Downloads\jdk-18_windows-x64_bin\jdk-18.0.1.1\bin\java -XX:+UseG1GC -Djava.io.tmpdir=C:\Program Files\sonarqube-9.5.0.56709\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=C:\Program Files\sonarqube-9.5.0.56709\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:\Program Files\sonarqube-9.5.0.56709\elasticsearch -Des.path.conf=C:\Program Files\sonarqube-9.5.0.56709\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2022.06.28 20:23:47 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.06.28 20:23:47 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2022.06.28 20:23:47 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2022.06.28 20:23:47 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2022.06.28 20:23:48 ERROR app[][o.s.a.p.EsManagedProcess] Failed to check status
org.elasticsearch.ElasticsearchException: java.lang.InterruptedException
	at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2695)
	at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:2171)
	at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:2137)
	at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:2105)
	at org.elasticsearch.client.ClusterClient.health(ClusterClient.java:151)
	at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:64)
	at org.sonar.application.process.EsManagedProcess.checkStatus(EsManagedProcess.java:92)
	at org.sonar.application.process.EsManagedProcess.checkOperational(EsManagedProcess.java:77)
	at org.sonar.application.process.EsManagedProcess.isOperational(EsManagedProcess.java:62)
	at org.sonar.application.process.ManagedProcessHandler.refreshState(ManagedProcessHandler.java:223)
	at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:288)
Caused by: java.lang.InterruptedException: null
	at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1048)
	at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:243)
	at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:75)
	at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2692)
	... 10 common frames omitted
<-- Wrapper Stopped

Hi,

Welcome to the community!

What do your server logs say?

 
Ann

The attached snippet is what i have got in my log file

Hi,

The error is about Elasticsearch. Is there anything in es.log?

 
Ann

Hi,
I cannot find anything with name es.log or anything similar in my sonarqube folder. I only have sonar.log file

Hi,

The fact that you don’t have all the logs is troublesome. I would start by making sure the user running SonarQube has full rights to $SONARQUBE-HOME, recursive.

Then I would make sure there’s nothing “helpful” like Windows Defender interfering.

And finally, by looking at the other threads in the community that have this error, it seems a common cause is that the port Elasticsearch uses, 9001, isn’t available. If that port is in use, you’ll need to either free it up or configure SonarQube (in $SONARQUBE-HOME/conf/sonar.properties) to use a different port for Elasticsearch.

 
HTH,
Ann

What is the version of Java you are using? I suspect you are using Java > 17 which is not supported.

Thanks for your valuable time,
I was using java 18.

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