How can I reduce the number of master candidate nodes from 3 to 1?

There are a total of 4 nodes, of which 3 are master candidate nodes.

I would like to specify one master candidate node for testing, but the operation does not proceed with the error below.

"[2019-06-19T20:16:12,366][WARN ][o.e.c.c.ClusterFormationFailureHelper] [node-d] master not discovered or elected yet, an election requires at least 2 nodes with ids from [wjxU7q4nReKwwD1y_ulTPw, tqa6ligxT5OF3N9jf1VfsQ, UtHL00IMRzihkL_erqCHPA], have discovered [] which is not a quorum; discovery will continue using [] from hosts providers and [{node-d}{UtHL00IMRzihkL_erqCHPA}{Bp98Iy8DThyZmtF2tkQR8g}{172.31.xx.xx}{172.31.xx.xx:9300}{ml.machine_memory=33449705472, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 57, last-accepted version 45021 in term 57"

It worked well when there were 3 master candidate nodes, but when I apply the settings below and restart each node, the above message keeps popping up.

Maybe something is wrong with my settings?

Node 1
node.master: true
node.data: false
cluster.initial_master_nodes : ["node-1"]
discovery.seed_hosts : ["node-1", "node-2", "node-3", "node-4"]

Node 2
node.master: false
node.data: true
cluster.initial_master_nodes : ["node-1"]
discovery.seed_hosts : ["node-1", "node-2", "node-3", "node-4"]

Node 3
node.master: false
node.data: true
cluster.initial_master_nodes : ["node-1"]
discovery.seed_hosts : ["node-1", "node-2", "node-3", "node-4"]

Node 4
node.master: false
node.data: true
cluster.initial_master_nodes : ["node-1"]
discovery.seed_hosts : ["node-1", "node-2", "node-3", "node-4"]

You should have at least 3 master-eligible nodes in your cluster. See these docs for more details: Designing for resilience | Elasticsearch Guide [8.1] | Elastic

If you really want to proceed anyway, you are effectively removing the master-eligible nodes from your cluster so you must follow these docs: Add and remove nodes in your cluster | Elasticsearch Guide [8.1] | Elastic

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.