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:
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.
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 nothing 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.
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.
and installed aws-cloud plugin. After restarting both of these nodes they should have auto discovered themselves to form a cluster, since the cluster name is same in both of this nodes. This seems to be not working in this case.
These settings seems to be removed from elasticsearch.yml in version 2.0.0.
Also, these settings may be required for Snapshot and Restore. If I am not wrong.
I see that you have to set a tag to access it. But i am confused as to where the cloud-aws plugin will accept credentials from. Simply installing the plugin doesnt make sense as it doesn't know which credentials to use. Sorry i haven't used this in 2.0 but the above settings works for me the downgraded version.
I have noticed that the nodes have discovered each other after installing this plugin.
Note: No changes were made to config file elasticsearch.yml. regarding ec2 discovery.
Seems that it took some time for nodes to discover each other and form a cluster after the plugin was installed. Also, the failover is working as expected.
Is your EC2 system have the credentials been stored anywhere. I mean how can the plugin know where the credential is. It simply cannot go and join anyway.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.