Discovery in multi node cluster using docker compose

I am trying to create a three node ElasticSEarch cluster following the tutorial

When I set cluster.initial_master_nodes to es1,es2,es3, I am getting the warning

this node is locked into cluster UUID [lUWf3vbtRcarnQXNd6rnjA] but [cluster.initial_master_
nodes] is set to [es1, es2, es3]; remove this setting to avoid possible data loss caused by subsequent cluster bootstrap attempts; for further information see https://www.ela

But, if I remove them I am getting the error

"master not discovered yet, this node has not previously joined a bootstrapped cluster, and [cluster.initial_master_nodes] is empty on this node: have discovered [{es3}{Qxw8OO4_RtKFtPEkdnk-EA}{SWhx6iLCT3eng13g3rcGzQ}{es3}{}{}{cdfhilmrstw}{8.9.2}, {es1}{1Xkq3FdiTwSZV2Fn3F-WRg}{jruwU2IRQPafSeISMkCYrw}{es1}{}{}{cdfhilmrstw}{8.9.2}, {es2}{51jDr41CSJ6CVNrijScFwA}{uVQdP0sJSbG7O2tZeNDrPA}{es2}{}{}{cdfhilmrstw}{8.9.2}]; discovery will continue using [,] from hosts providers and [{es3}{Qxw8OO4_RtKFtPEkdnk-EA}{SWhx6iLCT3eng13g3rcGzQ}{es3}{}{}{cdfhilmrstw}{8.9.2}] from last-known cluster state; node term 0, last-accepted version 0 in term 0; for troubleshooting guidance, see Troubleshooting discovery | Elasticsearch Guide [8.9] | Elastic

Hi @JoyceBabu Welcome to the community!

Did you just try this here .env plus the docker-compose.yml as provided.

That should work out of the box by just configuring the .env file I would not change settings if you are just learning.

However, if you've already started it incorrectly or it failed, you should remove everything before you try again Make sure all the containers and volume mounts are removed.

Thank you for your response @stephenb

I did manage to resolve it. I don't remember what the exact issue was, I think I was reusing the same volume for all three container.

1 Like