# Node id same in two nodes

**URL:** <https://discuss.elastic.co/t/node-id-same-in-two-nodes/170947>\
**Category:** Elasticsearch\
**Created:** [March 5, 2019, 4:19pm UTC](https://discuss.elastic.co/t/node-id-same-in-two-nodes/170947 "2019-03-05T16:19:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![josselinchevalay](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@josselinchevalay](https://discuss.elastic.co/u/josselinchevalay)\
**Post date:** [March 5, 2019, 4:19pm UTC](https://discuss.elastic.co/t/node-id-same-in-two-nodes/170947/1 "2019-03-05T16:19:21Z")

</div>

Hi guys,

currently i have a weird issue. I have two virtual machine distinct each vm a create a unique node typed master. this two vm are created node with the same node id. someone can explain me how to solve that ?

Regards

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 5, 2019, 4:20pm UTC](https://discuss.elastic.co/t/node-id-same-in-two-nodes/170947/2 "2019-03-05T16:20:11Z")

</div>

Did you create the second VM by cloning the first after the node had already been initiated (id is generated on first startup)?

---

<div class="post-metadata">

**Author:** ![Teddy\_Pulayan](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@Teddy\_Pulayan](https://discuss.elastic.co/u/Teddy_Pulayan)\
**Post date:** [March 6, 2019, 1:57am UTC](https://discuss.elastic.co/t/node-id-same-in-two-nodes/170947/3 "2019-03-06T01:57:12Z")

</div>

Hi Christian,  
I created the second entirely new VM. Not by cloning. Do you mean it should've been cloned?

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [March 6, 2019, 2:22am UTC](https://discuss.elastic.co/t/node-id-same-in-two-nodes/170947/4 "2019-03-06T02:22:52Z")

</div>

No - cloning is one of the typical causes of this problem.

This duplicate node-id is usually caused by copying the `data` directory from one node to another (either by cloning a VM or a disk, or simply by copying the directory manually).

Did you do something like that during your setup process?

---

<div class="post-metadata">

**Author:** ![josselinchevalay](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@josselinchevalay](https://discuss.elastic.co/u/josselinchevalay)\
**Post date:** [March 6, 2019, 1:50pm UTC](https://discuss.elastic.co/t/node-id-same-in-two-nodes/170947/5 "2019-03-06T13:50:07Z")

</div>

we use docker in this vm for create instance and on master we not bind (as volume) path.data.

---

<div class="post-metadata">

**Author:** ![josselinchevalay](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@josselinchevalay](https://discuss.elastic.co/u/josselinchevalay)\
**Post date:** [March 12, 2019, 9:00am UTC](https://discuss.elastic.co/t/node-id-same-in-two-nodes/170947/6 "2019-03-12T09:00:27Z")

</div>

Hi we recrate vm and change cpu and disk we this node get same node id. could you explain me how to generate this node id ?

regards

---

<div class="post-metadata">

**Author:** ![josselinchevalay](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@josselinchevalay](https://discuss.elastic.co/u/josselinchevalay)\
**Post date:** [March 12, 2019, 10:25am UTC](https://discuss.elastic.co/t/node-id-same-in-two-nodes/170947/7 "2019-03-12T10:25:11Z")

</div>

founded issue is caused because on my docker layer i hardcode a node name ... my bad sorry.

Regards

---

<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:** [April 9, 2019, 10:25am UTC](https://discuss.elastic.co/t/node-id-same-in-two-nodes/170947/8 "2019-04-09T10:25:12Z")

</div>

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