# Logstash External Component Retry Attempts

**URL:** <https://discuss.elastic.co/t/logstash-external-component-retry-attempts/202738>\
**Category:** Logstash\
**Created:** [October 8, 2019, 10:57pm UTC](https://discuss.elastic.co/t/logstash-external-component-retry-attempts/202738 "2019-10-08T22:57:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shimpi](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@shimpi](https://discuss.elastic.co/u/shimpi)\
**Post date:** [October 8, 2019, 10:57pm UTC](https://discuss.elastic.co/t/logstash-external-component-retry-attempts/202738/1 "2019-10-08T22:57:35Z")

</div>

Hello Members,

During logstash startup if, for any reason, logstash couldn't connect to the input or output plugin, it keeps on trying indefinitely.

My question is, is there any settings which tells it to stop after specified number of attempts? I'm more interested in Rabbit and JDBC as input and ES as output plugin settings.

**UPDATE** : For jdbc input, I saw **connection\_retry\_attempts**. I didn't see any such settings for rabbitmq input plugin.

Well, Logstash keeps on trying indefinitely. I think, that's OK. But when I send shutdown signal, it's not killing the process. I see **SIGTERM received. Shutting down.** message in stdout, but it keeps on logging the error message. Ideally, I would expect it to shutdown. Please let me know whether it's a Logstash bug or my understanding is not correct.

Thanks in advance!!

---

<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:** [October 9, 2019, 2:18pm UTC](https://discuss.elastic.co/t/logstash-external-component-retry-attempts/202738/2 "2019-10-09T14:18:38Z")

</div>

The connect! call has a [rescue/retry loop](https://github.com/logstash-plugins/logstash-mixin-rabbitmq_connection/blob/4df5dca57cfaefdbdbbcd96c4f872272ea12c2f9/lib/logstash/plugin_mixins/rabbitmq_connection.rb#L161) that will run forever. The connect! call never ends unless rabbitmq becomes available (or you send a second SIGTERM).

---

<div class="post-metadata">

**Author:** ![shimpi](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@shimpi](https://discuss.elastic.co/u/shimpi)\
**Post date:** [October 9, 2019, 7:04pm UTC](https://discuss.elastic.co/t/logstash-external-component-retry-attempts/202738/3 "2019-10-09T19:04:11Z")

</div>

Hello @Badger,

Thanks for the response!  
I tried sending multiple TERM signals, but still LS kept on logging the connection error message ☹

We have a shell script to stop the running process. It keeps on waiting (for some specified time) for process to stop. But for any reason, LS is not stopping, any planned operation after LS stop is getting delayed.  
We can always use kill -9, but trying to avoid it as much as possible.

---

<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 6, 2019, 7:04pm UTC](https://discuss.elastic.co/t/logstash-external-component-retry-attempts/202738/4 "2019-11-06T19:04:23Z")

</div>

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