SonarQube Elastic Search node is locked error

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) - Enterprise Edition
  • how is SonarQube deployed: Docker
  • what are you trying to achieve: Troubleshoot elastic search error that occurs after recreating docker containers for sonarqube instance
  • what have you tried so far to achieve this - Disk has been increased
    I don’t see anything irregular in other logs - sonarqube is operational and process[es] is running according sonar.log
    However, this is what I see in es.log for the past three days

es[o.e.c.c.ClusterBootstrapService] this node is locked into cluster UUID [mOvNtuPxQKaY-JP_p_x1xg] but [cluster.initial_master_nodes] is set to [sonarqube]; remove this setting to avoid possible data loss caused by subsequent cluster bootstrap attempts; for further information see Important Elasticsearch configuration | Elasticsearch Guide [8.7] | Elastic

This warning does not stop analysis or get in the way of running sonarqube. However, we can’t see anything on es.log other than this warning. Since elastic search is built in sonarqube server, we’d like to know how to solve this warning
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!


To be clear:

  • Everything is working fine?
  • es.log contains this warning but nothing further/subseqent is written to the file?



Yes, today I got a new warning that says
WARN es[o.e.m.f.FsHealthService] health check of [/opt/sonarqube/data/es8] took [8407ms] which is above the warn threshold of [5s]

Hi @eaung. How are you?

What were the steps you took to trigger this error?
Are you using pure Docker or docker-compose?

Hello Davi,
I’m good. How are you? Thanks for helping out.
We are using docker-compose, my bad.
Here is what happened and what we did:

  1. A week a go, we ran into analysisCache is full, report is missing, no space left on device, and elastic search storage full error. I’m afraid we had to restart the containers so I cannot provide the exact logs on those dates.
  2. So, to solve that, I tried to delete the mounted volume for sonarqube-sonaruqbe-data as suggested here Failed to load quality profiles - Sonarqube docker container - #2 by Sylvain_Combe. It was suggested to recreate but I might have misunderstood with deleting the volume.
  3. Then, we restarted sonarqube instance with docker-compose -f docker-compose.yml up, but it did not work as well. It was flagging unable to start container process sonarqube_sonarqube-data no such file or directory
  4. So, we recreated that sonarqubue_sonarqube-data folder, which again flags a permission error
  5. So, we decided to pull down all the containers with docker-compose down and up and backed out of the command
  6. Then, we started each container up manually and there was no issue
  7. After a couple days, we started to see that elastic search node is locked error.