With the settings you have in place, 2 master eligible nodes need to be available in the cluster in order for one of them to be elected master and the cluster to operate properly. If you only have one node started, what you are seeing is expected and correct, as this prevents a single node that gets partitioned off from the rest of the cluster, e.g. due to a network problem, to continue accepting data that could get lost..
what should be the value for discovery.zen.minimum_master_nodes to avoid above error.
I want to configure ES clusters to avoid downtime and also to avoid split brain situations. If possible please suggest good cluster setup like how many minimum nodes and what should be there roles like
This is not an error if you only have one node started. It is the correct behaviour.
The setting you have is correct in order to avoid split-brain scenarios and allow the cluster to be highly available. It does however require 2 nodes to be present.
If all nodes are master-eligible that would be the case. For larger clusters it is however common to have 3 dedicated master nodes, and of these 2 need to be available at all times. If you want to be able to lose any 2 nodes and still operate, you could have 5 master eligible nodes instead.
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.