# Logstash 6.2.4 stuck in infinite retry loop

**URL:** <https://discuss.elastic.co/t/logstash-6-2-4-stuck-in-infinite-retry-loop/153527>\
**Category:** Logstash\
**Created:** [October 23, 2018, 6:48am UTC](https://discuss.elastic.co/t/logstash-6-2-4-stuck-in-infinite-retry-loop/153527 "2018-10-23T06:48:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pankhuri](https://avatars.discourse-cdn.com/v4/letter/p/58f4c7/32.png) [@pankhuri](https://discuss.elastic.co/u/pankhuri)\
**Post date:** [October 23, 2018, 6:48am UTC](https://discuss.elastic.co/t/logstash-6-2-4-stuck-in-infinite-retry-loop/153527/1 "2018-10-23T06:48:24Z")

</div>

Hi,

I am using logstash 6.2.4 with following yml settings -

```
pipeline.batch.size: 600
pipeline.workers: 1
dead_letter_queue.enable: true

```

The conf file used to run logstash application is -

```
input {
    file {
        path => "/home/administrator/Downloads/postgresql.log.2018-10-17-06"
        start_position => "beginning"
        }
}
filter {
  grok {
        match => { "message" => "%{DATESTAMP:timestamp} %{TZ}:%{IP:uip}\(%{NUMBER:num}\):%{WORD:dbuser}%{GREEDYDATA:msg}"}
}
        }
output {
   stdout { codec => rubydebug }
   elasticsearch {
   id => 'es-1'
   hosts => ["localhost:9200"]
   timeout => 60
   index => "dlq"
   version => "%{[@metadata][version]}"
   version_type => "external_gte"
 }
}

```

The input is a normal log file which is formatted using grok filter.  
Here the version is always a string rather than a integer and thus elasticsearch throws error 400 Bad Request. (This is a test case for logstash and done intentionally)

On this error code - logstash should retry a finite number of times and then should push this request payload to dead\_letter\_queue file (as per the documentation - [https://www.elastic.co/guide/en/logstash/current/dead-letter-queues.html](https://www.elastic.co/guide/en/logstash/current/dead-letter-queues.html)), but it gets stuck in an infinite loop with mesaage -

[2018-10-23T12:11:42,475][ERROR][logstash.outputs.elasticsearch] Encountered a retryable error. Will Retry with exponential backoff {:code=\>400, :url=\>"localhost:9200/\_bulk"}

Following are the contents of data/dead\_letter\_queue/main directory -

1.log (contains a single value "1")

Please assist if any configuration is missing leading to this situation.

---

<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:** [November 20, 2018, 6:49am UTC](https://discuss.elastic.co/t/logstash-6-2-4-stuck-in-infinite-retry-loop/153527/2 "2018-11-20T06:49:26Z")

</div>

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