'Elasticsearch: failed to validate incoming join request from node

With Elasticsearch, I'm trying to set up a simple master-1 node with data-1 and data-2 nodes but when I look at the log I get this error :

I get this error http://puu.sh/FZQwv/3f31394ba7.png All nodes are fresh CentOS 7 machines that can ping each other. For all the clusters I've set:

cluster.name: playground
node.name:  <their name master-1/data-1/data-2>
network.host: [_local_,_site_]
http.port: 9200 
discovery.seed_hosts: ["<internal IP of master>"]
cluster.initial_master_nodes: ["master-1"]
(at the end):
node.master: (only true for master-1)
node.data: true
node.ingest: false
node.ml: false

Does anyone knows what's going on?



Solution 1:[1]

Thanks! It worked for me.

I stopped the service on all nodes and wiped the lib directory. It seems like the lib directory has some information about the cluster state and etc.

# rm -rf /var/lib/elasticsearch/*

After that, I started the elasticsearch on all nodes and they're joined in the cluster successfully. I also noticed that a new cluster name was generated.

// Before wiping out the directory on master node

# curl localhost:9200/_cat/nodes?v
ip             heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
172.31.102.113           17          64   8    0.12    0.12     0.09 im        *      master-1

# curl -s localhost:9200/ | grep cluster_uuid
  "cluster_uuid" : "pJC1_DRAT7GLLQzNUc-vfA",

// After wiping out the directory on master node

# curl localhost:9200/_cat/nodes?v
ip             heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
172.31.106.97             9          90   5    0.15    0.14     0.13 d         -      data-2
172.31.102.113           17          64   5    0.09    0.23     0.15 im        *      master-1
172.31.98.148            10          83   6    0.08    0.20     0.14 d         -      data-1

# curl -s localhost:9200/ | grep cluster_uuid
  "cluster_uuid" : "UOUOse7xSXKLm4xHUe0FQw",

Solution 2:[2]

Error messages saying they have different uuid between local cluster and remote cluster.

If each node has own cluster, you can't build a new cluster. You need to delete an existing cluster that to join a new cluster.

Follow steps:

  1. Stop your ElasticSearch service in all nodes.
  2. Wipe all contents from data path. You could check data path in your elasticsearch.yml.
  3. Restart ElasticSearch service.

Solution 3:[3]

I'm having exactly the same issue on my es cluster deployed in ubuntu 18.04.

However, this cmd does not work for me

rm -rf /var/lib/elasticsearch/*

Instead, I explicitly delete the nodes directory, then all my nodes can join the cluster successfully

rm -r /var/lib/elasticsearch/nodes

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 chakanhero
Solution 2 Jeong Hansol
Solution 3 Scorpioooooon21