The solution provided is to delete the data folder as it contains the node id which is stopping the node from joining the cluster.
But i don't want to delete the data folder ,I want it to join the cluster with the data .
Is it possible to change the node ID so that it joins the cluster?
The situation described was because the second node was using a data folder that was a copy of the first node's folder, and this includes its node ID. This is not supported, and all sorts of things can go wrong if you do this. You should start up a new node with an empty data folder and allow Elasticsearch to replicate the data across itself.
This is also not supported, and can cause arbitrarily bad problems. If it seems to have worked for you this time then this is more by luck than by design.
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.