I created a cluster for five nodes. However, one of the nodes does not see the rest and creates a cluster where this node is the only participant. I do everything in the same way on all nodes. Here is its config:
It looks like you are running an older version of Elasticsearch (up to 6.x). If all your nodes are master eligible you need to set minimum_master_nodes to 3 in order to avoid split-brain scenarios and multiple separate clusters forming.
Yes, that's what I did - I only use three nodes as a master. And all five nodes as a "node.data".
For my problem, maybe I need to clear the old cluster data? I just don’t know how to do it. On other servers there was the same problem, each of them saw only himself in a cluster, I ran this command: curl -XDELETE localhost:9200/_all (the current data is not very important to me, this is a test cluster) And after that four nodes gathered into a cluster, all but one.
If you have 3 master eligible node you must set minimum_master_nodes to 2 unless you are using Elasticsearch 7.x. I do not see this set in your config above.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.