I've set two master nodes in my cluster but it only shows "elastic-master" not "elastic-slave".(second node is not shown).How can I resolve it? I've already followed Elasticsearch documents but nothing changed!
My host file setting:
sudo nano /etc/hosts
192.168.143.30 elastic-master
192.168.143.23 elastic-slave
My config file:
# ---------------------------------- Cluster ------------------------------
cluster.name: elastic-a
# ------------------------------------ Node -------------------------------
node.name: elastic-master
node.master: true
node.data: true
# ---------------------------------- Network ------------------------------
network.host: 192.168.143.30
http.port: 9200
# --------------------------------- Discovery -----------------------------
discovery.seed_hosts: ["192.168.143.30","192.168.143.23"]
cluster.initial_master_nodes: ["elastic-slave", "elastic-master"]
My config file on second one:
# ---------------------------------- Cluster ------------------------------
cluster.name: elastic-a
# ------------------------------------ Node -------------------------------
node.name: elastic-slave
node.master: true
node.data: true
# ---------------------------------- Network ------------------------------
network.host: 192.168.143.23
http.port: 9200
# --------------------------------- Discovery -----------------------------
discovery.seed_hosts: ["192.168.143.30","192.168.143.23"]
cluster.initial_master_nodes: ["elastic-slave", "elastic-master"]
discovery
settings are wrong, those changed in version 7, you need todiscovery.seed_hosts
andcluster.initial_master_nodes
as explained in the documentation, also, this is your fullelasticsearcy.yml
? You are missing thecluster.name
config, it should be the same on both. – leandrojmp