I'm facing an issue with my Elasticsearch cluster and I'm looking for some guidance or suggestions on what might be happening.
I have an Elasticsearch cluster running version 6.5.1 with JVM 11.0.11. Recently, I've noticed that some of my indices, which were originally configured with 2 shards and 2 replicas, now have 1 shard and 1 replica.
This occurred after an incident where some nodes in my cluster became unreachable but later returned to normal operation. I suspect that the loss of shards and replicas may have occurred during this period.
My questions are as follows:
How is it possible that shards and replicas were lost during the process of node recovery?
Is there a way to prevent or monitor these reallocations during such incidents?
How can I restore the original configuration of 2 shards and 2 replicas for these indices?
I appreciate any help or insights on this issue. I'm looking to better understand how Elasticsearch manages shard and replica reallocations during cluster failures and how to ensure consistency in index configurations.
This is a very old version that has been EOL a long time. One common issue with clusters running version 6.x and earlier is misconfiguration, which can cause issues like you are mentioning. The first thing I would check is therefore that minimum_master_nodes is set correctly, which depends on the number of master eligible nodes in your cluster. Please share information about the topology of your cluster and what this setting is set to.
With 2 master eligible nodes discovery.zen.minimum_master_nodes should be set to 2. Your cluster is therefore incorrectly configured, which can lead to split-brain scenarios and a lot of issues, including inconsistencies and data loss.
You should also always look to have 3 master eligible nodes in the cluster as that would allow you to continue operating even if one of the master eligible nodes go down. If you had 3 master eligible nodes discovery.zen.minimum_master_nodes should still be set to 2.
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.