# My watcher runs twice

**URL:** <https://discuss.elastic.co/t/my-watcher-runs-twice/355612>\
**Category:** Elasticsearch\
**Created:** [March 18, 2024, 2:25pm UTC](https://discuss.elastic.co/t/my-watcher-runs-twice/355612 "2024-03-18T14:25:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khaled\_Saidi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/khaled_saidi/32/98636_2.png) [@Khaled\_Saidi](https://discuss.elastic.co/u/Khaled_Saidi)\
**Post date:** [March 18, 2024, 2:25pm UTC](https://discuss.elastic.co/t/my-watcher-runs-twice/355612/1 "2024-03-18T14:25:21Z")

</div>

Hi everyone,  
i'm trying to figure out what happens with my watcher. since i upgrade my elasticsearch cluster from 7.x to 8.8.2, its runs twice. First time with a success result, the second time error state with this exception:

`"version_conflict_engine_exception : required seqNo [35718827], primary term [39]. current document has seqNo [35782663] and primary term [39]"`.

Is anyone have an idea about this behaviour ?  
Thx for your help

---

<div class="post-metadata">

**Author:** ![Keith\_Massey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_massey/32/83666_2.png) [@Keith\_Massey](https://discuss.elastic.co/u/Keith_Massey)\
**Post date:** [March 21, 2024, 4:53pm UTC](https://discuss.elastic.co/t/my-watcher-runs-twice/355612/2 "2024-03-21T16:53:00Z")

</div>

Does restarting the node(s) fix the problem? If so, it might be this problem that we have seen, but only _very_ rarely -- [Watcher executes on a node after the .watches shard has been moved to a different node · Issue #105933 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/issues/105933). We have not found a way to reproduce it yet, so tracking down the problem has been difficult. If you are able to reproduce it, I would really appreciate instructions.  
If restarting the node(s) does not fix the problem, could you share your elasticsearch logs?

---

<div class="post-metadata">

**Author:** ![Khaled\_Saidi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/khaled_saidi/32/98636_2.png) [@Khaled\_Saidi](https://discuss.elastic.co/u/Khaled_Saidi)\
**Post date:** [March 27, 2024, 11:02am UTC](https://discuss.elastic.co/t/my-watcher-runs-twice/355612/3 "2024-03-27T11:02:44Z")

</div>

Hi Keith,  
Since 3 days, it works fine again... Without any action...

 ![watcher_status](https://us1.discourse-cdn.com/elastic/original/3X/3/b/3b814b4b36cdff2b01085405f965b05b14786baa.jpeg)

---

<div class="post-metadata">

**Author:** ![Keith\_Massey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_massey/32/83666_2.png) [@Keith\_Massey](https://discuss.elastic.co/u/Keith_Massey)\
**Post date:** [March 27, 2024, 6:03pm UTC](https://discuss.elastic.co/t/my-watcher-runs-twice/355612/4 "2024-03-27T18:03:18Z")

</div>

You could check the logs of all of your nodes to see which one(s) logged that they were running watches, or enabling or disabling watcher, or changing watch shard allocations. But since I have no idea what the problem might have been, unfortunately I can't really tell you what specifically to look for.

---

<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 24, 2024, 6:04pm UTC](https://discuss.elastic.co/t/my-watcher-runs-twice/355612/5 "2024-04-24T18:04:03Z")

</div>

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