When server A is turned off, then servers B and C are not available. This is normal?

Hi.
We have three servers (A, B and C).
Server A must be made a master.
Servers B and C with slaves.

Server A:
node.master: true
node.data: true
node.ingest: false
discovery.zen.ping.unicast.hosts: ["A", "B", "C"]

Server B
node.master: false
node.data: true
node.ingest: false
discovery.zen.ping.unicast.hosts: ["B", "C", "A"]

Server C
node.master: false
node.data: true
node.ingest: false
discovery.zen.ping.unicast.hosts: ["C", "A", "B"]

When server A is turned off, then servers B and C are not available. This is normal?

If you only have one master I think that is what happens.

Why can't B and C be masters?

node.master: true means that the node is "master eligible", not that it will be THE master. For a three node cluster you need...

Server A:
node.master: true
node.data: true
node.ingest: false
discovery.zen.ping.unicast.hosts: ["B", "C"]
discovery.zen.minimum_master_nodes: 2

Server B
node.master: true
node.data: true
node.ingest: false
discovery.zen.ping.unicast.hosts: ["C", "A"]
discovery.zen.minimum_master_nodes: 2

Server C
node.master: true
node.data: true
node.ingest: false
discovery.zen.ping.unicast.hosts: ["A", "B"]
discovery.zen.minimum_master_nodes: 2
2 Likes

Do the wizards B and C, and write data only on A?

It is assumed that A is RW, B and C are only R.

That is not what node.master means... The master role has to do with managing the cluster nodes.

All nodes will be RW. And node.data is what sets if documents are stored on the node or not.

1 Like

Or to make all servers node.master: true?

yes :smiley:

Even easier start your nodes with the only following configuration:

discovery.zen.ping.unicast.hosts: ["A", "B", "C"]
discovery.zen.minimum_master_nodes: 2
1 Like

Elasticsearch nodes form a cluster, it is not a master-slave architecture.

1 Like

Is this config not a little bit dangerous? Not listing the "local" node in discovery.zen.ping.unicast.hosts that is.

When ever any node goes down discovery.zen.minimum_master_nodes: 2 is not true anymore...

Say, node A goes down for any reason.

  • A can not be master (it is stopped)
  • B can not be elected master as it will need an answer from both C and A for who should be elected master
  • C can not be elected master as it will need an answer from both A and B for who should be elected master

I'm just curious... Maybe I don't know something about master election.

dadoonet write:

discovery.zen.ping.unicast.hosts: ["A", "B", "C"]
discovery.zen.minimum_master_nodes: 2

No it doesn't need an answer from both of those. B already knows about his own configuration, he just needs to find another master eligible node and he is good to go. So as long as A or C are reachable (in you example C would be), there is a 2 node quorum and all is well. B doesn't have to send a unicast message to himself.

@dadoonet was just arguing in favor of consistency on all three nodes. Either way works.

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