# NodeDisconnect Exception

**URL:** <https://discuss.elastic.co/t/nodedisconnect-exception/175936>\
**Category:** Elasticsearch\
**Created:** [April 9, 2019, 1:45am UTC](https://discuss.elastic.co/t/nodedisconnect-exception/175936 "2019-04-09T01:45:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aniaks](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@aniaks](https://discuss.elastic.co/u/aniaks)\
**Post date:** [April 9, 2019, 1:45am UTC](https://discuss.elastic.co/t/nodedisconnect-exception/175936/1 "2019-04-09T01:45:57Z")

</div>

I see whole load of below exceptions in the log. May i know what could be causing this issue ?

tried to fail engine but could not acquire lock - engine should be failed by now [primary shar  
d [[index\_1][13], node[e\_\_dqz3CS1GWuRhOEbozMw], [P], s[STARTED], a[id=x\_7pm6iBTB-a7ilI8MkbAA]] was demoted while failing replica shard]  
org.elasticsearch.cluster.action.shard.ShardStateAction$NoLongerPrimaryShardException: primary term [1] did not match current primary term [2]

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 9, 2019, 7:51am UTC](https://discuss.elastic.co/t/nodedisconnect-exception/175936/2 "2019-04-09T07:51:25Z")

</div>

This indicates that Elasticsearch was trying to handle a failure gracefully but could not do so because of another concurrent failure.

---

<div class="post-metadata">

**Author:** ![aniaks](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@aniaks](https://discuss.elastic.co/u/aniaks)\
**Post date:** [April 9, 2019, 12:47pm UTC](https://discuss.elastic.co/t/nodedisconnect-exception/175936/3 "2019-04-09T12:47:20Z")

</div>

Thanks David. However could you please explain what the failure is ? That would be very helpful. Thanks.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 9, 2019, 1:02pm UTC](https://discuss.elastic.co/t/nodedisconnect-exception/175936/4 "2019-04-09T13:02:15Z")

</div>

No, it's not possible to give much more detail from this tiny excerpt from your logs. We'll need to see all the other messages from around the same time.

---

<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:** [May 7, 2019, 1:02pm UTC](https://discuss.elastic.co/t/nodedisconnect-exception/175936/5 "2019-05-07T13:02:31Z")

</div>

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