I am creating an Elasticsearch cluster.
I am deleting the Elasticsearch node configuration that was already running on a single node and configuring a cluster with two newly created Elasticsearch nodes.
Here, the cluster is built, but the health of the existing index is now red and cannot be referenced from kibana.
How can I recover them?
Yes, I am. I have often struggled with this issue.
For example, I had the following problems
#tail -n 100 /var/log/elasticsearch/elasticsearch.log | grep WARN
... snip ...
[2022-07-13T16:42:12,171][WARN ][o.e.c.c.ClusterFormationFailureHelper] [ELSTEST-02] master not discovered or elected yet, an election requires a node with id [9DzP6zJnQbevgRgYmpGUug], have only discovered non-quorum [{ELSTEST-02}{fcux0tenQhSC-tuDyJRz_w}{EKW7ln-2RNCO39oRXiQ_uA}{ELSTEST-02}{XXX.XXX.XXX.XXX}{XXX.XXX.XXX.XXX:9300}{cdfhilmrstw}]; discovery will continue using [] from hosts providers and [{ELSTEST-02}{fcux0tenQhSC-tuDyJRz_w}{EKW7ln-2RNCO39oRXiQ_uA}{ELSTEST-02}{XXX.XXX.XXX.XXX}{XXX.XXX.XXX.XXX:9300}{cdfhilmrstw}] from last-known cluster state; node term 20, last-accepted version 756 in term 20
To solve this, I decided to delete the node directory, but I did not realize that this operation would break the index.
Is there any way to add a new node without breaking the existing node and index?
Hmmm, I'm not sure how Elasticsearch behaves.
Somehow it worked this time.
I started another Elasticsearch with a cluster configuration while I was running a single node Elasticsearch, and then restarted the existing Elasticsearch.
This time I was able to create a cluster configuration without breaking the indexes that the existing Elasticsearch was collecting.
This is my ideal cluster extension.
Is this a correct operation?
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.