Multi Master configuration

Hi Team,

I'm currently trying to configure an elastic search cluster with 2 masters and 3 data nodes
My cluster is working 1 Master and 3 data Node.

root@ELK-Master1:~# curl http://IP:9200/_cat/nodes?v
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
host1 24 8 0 0.00 0.00 0.00 di - ELK-Slave1
host2 14 8 0 0.00 0.00 0.00 di - ELK-Slave3
host3 29 8 0 0.03 0.01 0.00 di - ELK-Slave2
Master1 14 13 47 3.77 3.68 2.61 mdi * ELK-Master1

But the second Master couldn't add into Master 1.

Master1 elasticsearch.yaml:
cluster.name: PreProd-Cluster
node.name: ELK-Master1
node.master: true
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: Master1
http.port: 9200
discovery.seed_hosts: ["Master1, Master2"]
cluster.initial_master_nodes: ["Master1, Master2"]

Master2 elasticsearch.yaml:
cluster.name: PreProd-Cluster
node.name: ELK-Master1
node.master: true
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: Master1
http.port: 9200
discovery.zen.minimum_master_nodes: 2
discovery.seed_hosts: ["Master1, Master2"]
cluster.initial_master_nodes: ["Master1, Master2"]

Elasticsearch is operates in a clustered mode and is not a master-slave system as indicated by your node names. As it relies on consensus algorithms, you should always aim to have at least 3 master-eligible nodes in your cluster. Having 2 master eligible nodes in a cluster is a bad idea as the cluster will be in a red state if any of them go down as there is no majority available to elect a new master.

As you are on the latest version I believe you simply leave the current single master node in the config and then add the new master eligible node(s).

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