0

I am setting up an Elasticsearch cluster with ES version 2.0.0. I have set up cluster with two nodes in EC2.

I have found following issues:

  1. Auto discovery not working: With setup of two nodes having cluster.name same on both nodes. These nodes failed to discover each other. After changing config to described in this post I got the basic cluster working with master and slave.

  2. Automatic failover: The cluster failed to elect slave as master when node 1 was stopped which made the cluster inoperable.

What may be the reason that the ES cluster not doing failover?

I see nothin extra in logs except

[discovery.zen] [stag-elastic-node-2] master left (reason = shut_down),.....

No logs related to election appears in log file of any node.

Config file node 1:

 cluster.name: stag-elastic-cluster
 node.name: stag-elastic-node-1
 index.number_of_shards: 2
 index.number_of_replicas: 1
 network.host: 0.0.0.0
 discovery.zen.ping.multicast.enabled: false
 discovery.zen.ping.unicast.hosts: ["10.x.x.x","10.x.x.x"]

Config file node 2:

  cluster.name: stag-elastic-cluster
  node.name: stag-elastic-node-2
  index.number_of_shards: 2
  index.number_of_replicas: 1
  network.host: 0.0.0.0
  discovery.zen.ping.multicast.enabled: false
  discovery.zen.ping.unicast.hosts: ["10.x.x.x","10.x.x.x"]

Ports 9200 and 9300 are open in both directions. Any help will be appreciated.

Community
  • 1
  • 1
Atish
  • 4,277
  • 2
  • 24
  • 32

0 Answers0