# Logstash Periodically Failing

**URL:** <https://discuss.elastic.co/t/logstash-periodically-failing/277353>\
**Category:** Logstash\
**Created:** [June 29, 2021, 12:41pm UTC](https://discuss.elastic.co/t/logstash-periodically-failing/277353 "2021-06-29T12:41:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jtillman2020](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@jtillman2020](https://discuss.elastic.co/u/jtillman2020)\
**Post date:** [June 29, 2021, 12:41pm UTC](https://discuss.elastic.co/t/logstash-periodically-failing/277353/1 "2021-06-29T12:41:39Z")

</div>

Every few days I notice my logstash stops ingesting data. When I check the log I find this:

> [2021-06-29T03:30:39,236][ERROR][logstash.javapipeline][main] Pipeline worker error, the pipeline will be stopped {:pipeline\_id=\>"main", :error=\>"Counters can not be incremented by negative values",

I usually end up restarting all three services (ELK) and it starts working again. Can someone point me in the right direction for troubleshooting?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [June 29, 2021, 1:07pm UTC](https://discuss.elastic.co/t/logstash-periodically-failing/277353/2 "2021-06-29T13:07:41Z")

</div>

The exception is happening [here](https://github.com/elastic/logstash/blob/68c753439dd9c365fd8fba56f972b8c907bdd1e8/logstash-core/src/main/java/org/logstash/instrument/metrics/counter/LongCounter.java#L95). This [issue](https://github.com/elastic/logstash/issues/8168#issuecomment-347411509) suggests it may be caused by NTP moving time backwards (but make sure you follow the links to see why folks think that is not so).

---

<div class="post-metadata">

**Author:** ![jtillman2020](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@jtillman2020](https://discuss.elastic.co/u/jtillman2020)\
**Post date:** [June 29, 2021, 1:42pm UTC](https://discuss.elastic.co/t/logstash-periodically-failing/277353/3 "2021-06-29T13:42:33Z")

</div>

Thank you.

Hmm...it looks like the original issue was resolved in 6.0.1 and 6.1.0. I am running 7.10.1. Although I see the response on [this](https://discuss.elastic.co/t/counters-can-not-be-incremented-by-negative-values-error-when-using-metric-filters-freezes-workers-and-corrupts-the-persistent-queue/108644) post found a work around with his filter. I do not have a metrics filter like that user though. So I'm still not sure where to go from here.

---

<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:** [July 27, 2021, 1:42pm UTC](https://discuss.elastic.co/t/logstash-periodically-failing/277353/4 "2021-07-27T13:42:47Z")

</div>

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