which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension) - 9.9.8
how is SonarQube deployed: zip, Docker, Helm - docker container
what are you trying to achieve - trying to bring sonarqube up where it is failing with elastic search startup.
what have you tried so far to achieve this - I have stopped the sonarqube and deleted the contents inside es7 folder and started sonarqube again the sonarqube is getting started but in the sonarqube main page i see a banner saying. I can see few cancelled task. " SonarQube completed the reload of project data. Some [tasks failed or cancelled](https://sonarqube.xyz.com/admin/background_tasks?taskType=ISSUE_SYNC&status=FAILED) causing some projects to remain unavailable."
This page will be available after the data is reloaded. This might take a while depending on the amount of projects and issues in your SonarQube instance.
You can keep analyzing your projects during this process.
Your version is past EOL. You should upgrade to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your upgrade path is:
[es.log|attachment]
Looking into the server processes I can see only the java processes related to sonarqube is only running. I have ran ps -ef command.
I see more of node unhealthy and node lock problems. I have attached the es.log file.
Please guide on how to fix this problem. es.log (3.8 MB)
In ce.log I can see the below warnings. I have also attached all the logs for better understanding
Suppressed: org.elasticsearch.client.ResponseException: method [POST], host [http://localhost:9001], URI [/_bulk?timeout=1m], status line [HTTP/1.1 503 Service Unavailable]
{"error":{"root_cause":[{"type":"cluster_block_exception","reason":"blocked by: [SERVICE_UNAVAILABLE/2/no master];"}],"type":"cluster_block_exception","reason":"blocked by: [SERVICE_UNAVAILABLE/2/no master];"},"status":503}
at org.elasticsearch.client.RestClient.convertResponse(RestClient.java:347)
at org.elasticsearch.client.RestClient.access$1900(RestClient.java:108)
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:397)
... 16 common frames omitted
I can see a banner saying 12 tasks are failing and the error logs show
java.lang.IllegalStateException: Unrecoverable indexation failures: 1 errors among 1 requests. Check Elasticsearch logs for further details.
at org.sonar.server.es.IndexingListener$1.onFinish(IndexingListener.java:42)
at org.sonar.server.es.BulkIndexer.stop(BulkIndexer.java:131)
at org.sonar.server.measure.index.ProjectMeasuresIndexer.doIndex(ProjectMeasuresIndexer.java:158)
at org.sonar.server.measure.index.ProjectMeasuresIndexer.indexOnAnalysis(ProjectMeasuresIndexer.java:87)
at org.sonar.ce.task.projectanalysis.step.IndexAnalysisStep.execute(IndexAnalysisStep.java:45)
at org.sonar.ce.task.step.ComputationStepExecutor.executeStep(ComputationStepExecutor.java:79)
at org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:70)
at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:57)
at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:75)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:212)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:194)
at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:160)
at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:135)
at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:87)
at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
That means that Elasticsearch saw a change in its data directory for which it was not responsible, so it stops all write activity to protect your data. To fix it, remove any other process that might make such a change and then restart Elasticsearch.
To be clear, you can’t restart SonarQube Elasticsearch process granularly. You’ll need to restart SonarQube.
I have tried to redeploy sonarqube. it is complaining the same issue. I have also tried to mount the same volume in another jumphost kind of pod and deleted the contents in es7 folder and started the sonarqube server. still in es.log i see the
2025.03.25 06:30:57 WARN es[][o.e.c.c.ClusterFormationFailureHelper] this node is unhealthy: health check failed due to broken node lock
2025.03.25 06:31:07 WARN es[][o.e.c.c.ClusterFormationFailureHelper] this node is unhealthy: health check failed due to broken node lock
2025.03.25 06:31:17 WARN es[][o.e.c.c.ClusterFormationFailureHelper] this node is unhealthy: health check failed due to broken node lock
2025.03.25 06:31:27 WARN es[][o.e.c.c.ClusterFormationFailureHelper] this node is unhealthy: health check failed due to broken node lock
2025.03.25 06:31:30 WARN es[][r.suppressed] path: /_cluster/health, params: {master_timeout=30s, level=cluster, timeout=30s}
org.elasticsearch.discovery.MasterNotDiscoveredException: null
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$2.onTimeout(TransportMasterNodeAction.java:297) [elasticsearch-7.17.15.jar:7.17.15]
at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:345) [elasticsearch-7.17.15.jar:7.17.15]
at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:263) [elasticsearch-7.17.15.jar:7.17.15]
at org.elasticsearch.cluster.service.ClusterApplierService$NotifyTimeout.run(ClusterApplierService.java:660) [elasticsearch-7.17.15.jar:7.17.15]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:718) [elasticsearch-7.17.15.jar:7.17.15]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
at java.lang.Thread.run(Unknown Source) [?:?]
2025.03.25 06:31:37 WARN es[][o.e.c.c.ClusterFormationFailureHelper] this node is unhealthy: health check failed due to broken node lock
2025.03.25 06:31:47 WARN es[][o.e.c.c.ClusterFormationFailureHelper] this node is unhealthy: health check failed due to broken node lock
2025.03.25 06:31:57 WARN es[][o.e.c.c.ClusterFormationFailureHelper] this node is unhealthy: health check failed due to broken node lock