Elasticsearch Exited unexpectedly, with exit code 1

Elasticsearcch exited unexpectedly, with exit code 1


Welcome to the community!

Screenshots of logs are hard to deal with. Pictures of screens even more so.

You should check your server logs. If you don’t understand the error there, please copy/paste the text of the logs here for help.


Thank you so much for your response. here is the Error

Feb 22, 2024 12:36:03 PM sun.til. locale-provider. LocaleProviderAdapter <clinit>
WARNING: COMPAT locale provider will be removed in a future release
ERROR: Elasticsearch did not exit normally - check the logs at D: \ISO\ sonarqube-\ sonarqube-\logs\sona rqube. log
ERROR: Elasticsearch exited unexpectedly, with exit code 1 2024.02.22 12:36:09 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]:
2024.02.22 12:36:09 INFO app[] [o.s.a.SchedulerImpl] Process [ElasticSearch] is stopped
2024.02.22 12:36:09 ERROR app[][o.s.a.p. EsManagedProcess] Failed to check status hava. lang.RuntimeException: thread waiting for the response was interrunted
    at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:901)
    at org.elasticsearch.client.Restclient.performRequest(RestClient.java:300)
    at org-elasticsearch. client.RestClient.performRequest (RestClient. java: 288)
    at org.elasticsearch.client.RestHighLevelclient.performClientRequest(RestHighLevelclient.java:2699)
    at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient-java:2171)
    at org.elasticsearch.client.RestHighLevelClient-performRequest(RestHighLevelclient.java:2137)
    at org.elasticsearch.client.RestHighLevelClient-performequestAndarseEntity(RestHighLevelClient.java:2105)
    at org.elasticsearch.client.ClusterClient.health (ClusterClient. java: 151)
    at org. sonar. application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImp1.java:79)
    at org. sonar -application process. EsManagedProcess.checkStatusEsManagedProcess.java:92) at org.sonar.application-process.EsManagedProcess-checkOperational(EsManagedProcess.java:77) org.sonar.application.process.EsManagedProcess.isOperational (EsManagedProcess. java
    at org .sonar .application -process.ManagedProcessHandler.refreshState(ManagedProcessHandler-java:223)
    at org.sonar .application .process.Managed rocessHandler$Even tWatcher. run (Managed roces sHandler - java: 288)
aused by: java.lang. InterruptedException: null
    at java.base/java. lang.Object.wait (Native Method) at java.base/java.lang.Object.wait(Object. java: 366)
    at java.base/java.lang.Object.wait(Object-java:359)
    at org.apache.http.concurrent.BasicFuture.get (BasicFuture-java: 82)
    at org.apache.http.1mpl.nio.client.FutureWrapper.get[FutureWrapper.java:70)
    at org.elasticsearch.client.RestClient.performRequest(RestClient.java:296)
common Frames omitted
2024.02.22 12:36:09 INFO app[|[o.s.a. SchedulerImp1] SonarQube is stopped


Looks like something external to SonarQube killed this process.


Thank you for your response. It’s showing Elasticsearch exited unexpectedly, with exit code 1


Yes, that’s where we started.

What your logs indicate is that Elasticsearch didn’t “choose” to exit. It was interrupted by some external force.

So you need to figure out what person or process killed Elasticsearch.


OK. Thank you so much.

Hello, Thank you so much for your help so far. I discover that I have java 21 in stall and sonarqube 10.4 does not support java 21. However, I have downgraded it to java 17. So, now I am getting this error.

Please help

D: \ISO\ sonarqube-\ sonarqube- \bin windows-x86-64›StartSonar.bat

Starting SonarQube.

2024.02-26 11:44:22 INFO app[1[o.S.a.AppFileSystem] Cleaning or creating temp directory D: VISO\sonarqube-\ sonarqube- \tem, 2024.02.26 11:44:22 INFO app[][o.s.a.es. EsSettings] Elasticsearch listening on [HTTP: 9001, CP:]

2024.02.26 11:44:22 INFO app[] [o.s.a.ProcessLauncherImp1] Launch process [ELASTICSEARCH] from [D: \ISO\ sonarqube-\ sonarqube-

Kelasticsearch]: C: \Program Files\Java\jdk-17\bin \java -Xms4m -Xmx64m -XX: +UseSerialGC -Dcli.name=server

Dc 1 scribts. /oin/ela sticsearch -Deli 1÷h


86\ sonarqube-\ temp \confles-Des.distribution-type-tar-cpD:\ISO\sonarqube-\sonarqube-\elasticsearch\lib\*;D:\

SO\ sonarqube-\ sonarqube-10.4.0-87286 \elastic search\lib \cli-launcher\* org-elasticsearch. launch


2024.02.26 11:44:22 INFO app [o.s.a.SchedulerImpll Waiting for Elasticsearch to be up and running

2024.02.26 11:44:35 INFO app| | [o.s.a.SchedulerImp]] Process [es] is up

2024.02.26 11:44:35

INFO app[][o.s.a.ProcessLauncherImp1] Launch process[WEB_SERVER] from [D: \ISO\ sonarqube-\ sonarqube-]:

C: Program Files Java\ idk-17\bin java - Djava.awt.headless=true-Dfile.encoding=UTF-8-Diava.io.tmpdir=D:\ISO\sonarqube-\sonarqube-10.4 6.87286\temp -XX: - OmitStackTraceInFastThrow--add-opens-java.base/java.util-ALL-UNNAMED--add-opens-java.base/java.lang-ALL-UNNAMED--add-opens-jav la.base/java.1o=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED--add-exports=java.base/jak.internal

-ref=ALL -UNNAMED --add-opens-java

_base/java.n1o=ALL-UNNAMED --add-opens=java.basesun.nio.ch=ALL-UNNAMED

--add-opens=java.management/sun.management=ALL-UNNAMED ~-add-openseidk man

gement/com. sun management. internal=ALL -UNNAMED -Dcom.redhat.fips-false -Xmx512m -Xms128m

-XOX: +HeapDumpOnOutOfMemory Error -Dhttp.nonProxyHosts-local


r-application- - jar; D: \ISO\sonarqube- \ sonarqube-\1ib\jdbc\mssq1\mssql-jdbc-12.4.

•jre11.jar org. sonar. server. app. WebServer D: \ISO\ sonarqube-\ sonarqube-\temp\sq-process11484578381380234349properties

WARNING: A terminally deprecated method in java. lang System has been called

WARNING: System:: setSecurityManager has been called by org.sonar-process.PluginSecurityManager (file: /D: /ISO/sonarqube-

09.87286/lib/sonar-application- jar)

WARNING: Please consider reporting this to the maintainers of org-sonar-process.PluginSecurityManager

WARNING: System: : setSecurityManager will be removed in a future release.

2824.02.26 11:44:38 INFO app[1 [os.a Scheduler-Imp1] Process[Web Server] is stopped

2024.02.26 11:44-38 TNEO app[][o.s.a.SchedulerImp1

Process Elasticsearch is stopped

2024.82.26 11:44:38 INFO app[][o-s.a.SchedulerImp1] SonarQube is stopped


Again, what do your server logs say?