Issue in ElasticSearch Cluster

Could not form a cluster with 1 master node and two data nodes .
Im creating cluster inside vbox.

Getting Handshake exception. Please help me to solve the issue.

Master Node yml file:

cluster.name: CRIST
node.name: es-master-01
node.master: true
network.host: 0.0.0.0
discovery.zen.ping.unicast.hosts: ["192.168.33.13","192.168.33.11","192.168.33.14"]

data node 1 yml file:

cluster.name: CRIST
node.name: data-node-01
node.data: true
network.host: 0.0.0.0
discovery.zen.ping.unicast.hosts: ["192.168.33.11", "192.168.33.13","192.168.33.14"]

data node 2 yml file:

cluster.name: CRIST
node.name: data-node-02
node.master: false
node.data: true
network.host: 0.0.0.0
discovery.zen.ping.unicast.hosts: ["192.168.33.11", "192.168.33.13","192.168.33.14"]

Logs for your reference:

[data-node-02] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2018-04-24T12:27:51,425][WARN ][o.e.d.z.ZenDiscovery ] [data-node-02] failed to connect to master [{es-master-01}{MqmS11EbSBSjps9cISRDyw}{qI9S3ZeiSDWLbS-74fDBSQ}{10.0$org.elasticsearch.transport.ConnectTransportException: [es-master-01][10.0.2.15:9300] handshake failed. unexpected remote node {data-node-02}{xLTwvjwZTluE0WsFJKQCjw}{WP-e6$ at org.elasticsearch.transport.TransportService.lambda$connectToNode$3(TransportService.java:335) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.transport.TcpTransport.connectToNode(TcpTransport.java:514) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:331) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:318) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.discovery.zen.ZenDiscovery.joinElectedMaster(ZenDiscovery.java:515) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.discovery.zen.ZenDiscovery.innerJoinCluster(ZenDiscovery.java:483) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.discovery.zen.ZenDiscovery.access$2500(ZenDiscovery.java:90) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.discovery.zen.ZenDiscovery$JoinThreadControl$1.run(ZenDiscovery.java:1253) [elasticsearch-6.2.4.jar:6.2.4]

Thanks in advance!

[data-node-02] failed to connect to master

and

handshake failed. unexpected remote node {data-node-02}

are key here

I think that should be a list of master-eligible nodes.

I would try to create a cluster first with default settings (all nodes master-eligible). Also, iirc, having the cluster name in all caps can cause issues but that might be my memory playing tricks on me.

ok I'll change the list to have only master-eligible nodes

I tried the
a) discovery.zen.ping.unicast.hosts with only master eligible nodes
b) changed cluster name to small

both gave same exception- Handshake failed

on hitting _cluster api
root@data-node-01:/# curl -XGET 'localhost:9200/_cluster/state?pretty'
{
"error" : {
"root_cause" : [
{
"type" : "master_not_discovered_exception",
"reason" : null
}
],
"type" : "master_not_discovered_exception",
"reason" : null
},
"status" : 503
}

The first node you have to get running is es-master-01

Once you have ES running there and curl http://es-master-01:9200 gives you an ok response, then you can try to start the two other ones.

Before starting ES on the other VMs, make sure that curl http://es-master-01:9200 also works from them.

For es-master-01 I would use the IP for that VM in the curl commands.

this ip is 10.0.2.15 is not 192.168.33.11 see you system hosts configure.

I removed transport.host and set network.host as my VM's ip. And it worked. Thanks for the support.

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