DapeWork

Master Not Discovered

Severity: Critical
Elasticsearch Version: 8.5.0

Problem

Cluster fails to elect a master node, leading to a split-brain scenario or no cluster coordination.

Root Cause

Insufficient eligible master-eligible nodes, network partition, or misconfiguration preventing election.

How to Detect

Symptoms

  • Cluster health shows 'red' with no master node assigned
  • Nodes are in 'disconnected' or 'initializing' state
  • Cluster state API indicates 'no master node'
  • Logs show repeated master election failures

Commands

curl -X GET 'localhost:9200/_cluster/health?pretty'
curl -X GET 'localhost:9200/_cat/nodes?v&h=ip,master,name'
curl -X GET 'localhost:9200/_cluster/state?pretty'

Remediation Steps

  1. Verify network connectivity between nodes
  2. Check 'discovery.zen.minimum_master_nodes' setting matches the quorum size
  3. Ensure all master-eligible nodes are running and properly configured
  4. Restart nodes one at a time to allow re-election
  5. Review logs for errors related to master election
  6. Adjust 'discovery.zen.ping.timeout' and 'discovery.zen.fd.ping_interval' if network issues are suspected

Prevention

  • Configure an odd number of master-eligible nodes to avoid split-brain
  • Set 'discovery.zen.minimum_master_nodes' to (N/2)+1
  • Implement proper network segmentation and monitoring
  • Regularly update Elasticsearch to latest stable version
  • Use dedicated master nodes with sufficient resources

Production Example

curl -X GET 'localhost:9200/_cluster/health?pretty'