Elasticsearch 5.0.0. cluster node not joining

Remove the directory <Elastic search home>/data and restart the ES node, this issue is due to elastic search storing id in this directory, and this is a common mistake when copying one working elastic search directory from one node to another.

after fixing the issue, check the cluster status like this:

curl -X GET "localhost:9200/_cluster/health"

works fine with elastic search 6 as well


Ok so the issue was copying the elasticsearch folder from one node to another over scp. Elasticsearch saves the node id in elasticsearch/data/ folder. Deleted the data folder on one node and restarted it. The cluster is up and running. Hope this saves someone the hassle.