Elasticsearch failure on startup

Hi Ann,

I am having issue upgrading sonarqube version from 8.9.3 to 8.9.6, I am using docker image 8.9.6-community . All I can see from the logs is elasticsearch failed to start:

INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

how can we check the cause of elasticsearch failure ?

Hi,

Welcome to the community!

I’ve moved your post to a new thread since it was unrelated to the thread you posted in. Please create new threads for new topics/subjects.

Regarding your question, what do your server logs say?

 
Ann

A post was split to a new topic: Could not find java in ES_JAVA_HOME at /usr/bin/java

Hi Ann,

As I am running the service in container there is not much of Information in docker logs too.
I see “error occurred during initialization of VM”

Jan 21 10:06:48  docker/sonar_sonarqube_test[1976]: 2022.01.21 10:06:48 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
Jan 21 10:06:48 docker/sonar_sonarqube_test[1976]: 2022.01.21 10:06:48 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:43146]
Jan 21 10:06:48  docker/sonar_sonarqube_test[1976]: 2022.01.21 10:06:48 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
Jan 21 10:06:48  docker/sonar_sonarqube_test[1976]: 2022.01.21 10:06:48 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
Jan 21 10:06:52  docker/sonar_sonarqube_test[1976]: warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
Jan 21 10:06:52  docker/sonar_sonarqube_test[1976]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Jan 21 10:06:52  docker/sonar_sonarqube_test[1976]: Error occurred during initialization of VM
Jan 21 10:06:52  docker/sonar_sonarqube_test[1976]: Multiple garbage collectors selected
Jan 21 10:06:52  docker/sonar_sonarqube_test[1976]: 2022.01.21 10:06:52 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
Jan 21 10:06:52  docker/sonar_sonarqube_test[1976]: 2022.01.21 10:06:52 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
Jan 21 10:06:52 docker/sonar_sonarqube_test[1976]: 2022.01.21 10:06:52 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

Hi @naveenbudagam

can you check you configuration and make sure to not pass any garbage collector option to ES (as in sonar.search.*)? It seems like you are trying to use UseConcMarkSweepGC, which is deprecated.
We set the garbage collector based on the recommendations of elastic automatically here.

1 Like

Thanks @Tobias_Trabelsi now the elasticsearch and sonaqube is up and running.
Didn’t find this information on the docs