# Elasticsearch 2.4 node changed after java heap crashed

**URL:** <https://discuss.elastic.co/t/elasticsearch-2-4-node-changed-after-java-heap-crashed/138969>\
**Category:** Elasticsearch\
**Created:** [July 6, 2018, 5:43pm UTC](https://discuss.elastic.co/t/elasticsearch-2-4-node-changed-after-java-heap-crashed/138969 "2018-07-06T17:43:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![motts](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@motts](https://discuss.elastic.co/u/motts)\
**Post date:** [July 6, 2018, 5:43pm UTC](https://discuss.elastic.co/t/elasticsearch-2-4-node-changed-after-java-heap-crashed/138969/1 "2018-07-06T17:43:51Z")

</div>

Hello,

As the title suggests, the ES 2.4 instance I had running crashed due to out of java heap error. I increased the memory and restarted ES, but all of the data started showing up as analyzed. Did some more digging and found that _/var/lib/elasticsearch/elasticsearch/nodes/0_ changed to nodes/1.

This must have affected the mapping. I have found some documentation on how to reindex data, but I cannot find info on how to specify nodes. I am guessing I need to reindex the data from node/1 to node/0 and then delete node/1.

Any advise would be welcomed.

Thanks

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 6, 2018, 7:14pm UTC](https://discuss.elastic.co/t/elasticsearch-2-4-node-changed-after-java-heap-crashed/138969/2 "2018-07-06T19:14:56Z")

</div>

That was probably caused by the fact that the nodes was still appearing as "locked".  
I don't remember the file name exactly, but if you stop the node (which is currently using dir 1), remove the lock file in dir 0, remove the dir 1 and restart elasticsearch, you should see again all your data.

---

<div class="post-metadata">

**Author:** ![motts](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@motts](https://discuss.elastic.co/u/motts)\
**Post date:** [July 9, 2018, 2:06pm UTC](https://discuss.elastic.co/t/elasticsearch-2-4-node-changed-after-java-heap-crashed/138969/3 "2018-07-09T14:06:20Z")

</div>

Ok. I will dig around and see what I can find.

---

<div class="post-metadata">

**Author:** ![motts](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@motts](https://discuss.elastic.co/u/motts)\
**Post date:** [July 10, 2018, 5:52pm UTC](https://discuss.elastic.co/t/elasticsearch-2-4-node-changed-after-java-heap-crashed/138969/4 "2018-07-10T17:52:41Z")

</div>

The nodes are both on the same virtual machine. I am not sure if stopping elasticsearch, removing the entire node 1 directory, and restart elasticsearch will bring back the old data. I have looked through the documents online, and I do not recall seeing anything about this.

I have looked at reindexing the data from node 1 to node 0, but I cannot find any supported documents that say this can be done.

Do you happen to have any more information?

Thanks

---

<div class="post-metadata">

**Author:** ![motts](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@motts](https://discuss.elastic.co/u/motts)\
**Post date:** [July 12, 2018, 12:25pm UTC](https://discuss.elastic.co/t/elasticsearch-2-4-node-changed-after-java-heap-crashed/138969/5 "2018-07-12T12:25:02Z")

</div>

I found a node.lock file, and did some googling on that. It seems the node.lock file is associated with elastic using that dir to store files. However, in my lab I stopped elastic, moved all the node 0 files to node 1 (including the node.lock file), and restarted elastic, but all the new incoming data was written to the original node 0 and a new node.lock file was placed there. There must be something else associated with elastic using node 1 dir instead of node 0 dir.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 9, 2018, 12:25pm UTC](https://discuss.elastic.co/t/elasticsearch-2-4-node-changed-after-java-heap-crashed/138969/6 "2018-08-09T12:25:03Z")

</div>

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