I have configured two nodes to create a cluster. Both these nodes are working fine separately. When We join them together to form a cluster, Only single node is appearing in cluster.
The elasticsearch.yml of both node is mentioned below:
========Node-1======================
cluster.name: "docker-cluster"
network.host: 0.0.0.0
http.port: 9200
node.master: true
node.data: true
discovery.zen.minimum_master_nodes: 2
discovery.zen.ping.unicast.hosts: ["NODE1-IP","NODE2-IP"]
===============Node-2==============
cluster.name: "docker-cluster"
network.host: 0.0.0.0
http.port: 9200
node.master: true
node.data: true
discovery.zen.minimum_master_nodes: 2
discovery.zen.ping.unicast.hosts: ["NODE1-IP","NODE2-IP"]
My Requirement is to create a cluster of two nodes and if node1(Master node) fails anyhow, node2 automatically starts working as a Master node.
I have searched a lot but can't find anything wrong in my configuration.
Please help!!!