# Logstash TCP Input expected behavior when event source connection reset

**URL:** <https://discuss.elastic.co/t/logstash-tcp-input-expected-behavior-when-event-source-connection-reset/178070>\
**Category:** Logstash\
**Created:** [April 23, 2019, 3:55pm UTC](https://discuss.elastic.co/t/logstash-tcp-input-expected-behavior-when-event-source-connection-reset/178070 "2019-04-23T15:55:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![freakingid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/freakingid/32/41516_2.png) [@freakingid](https://discuss.elastic.co/u/freakingid)\
**Post date:** [April 23, 2019, 3:55pm UTC](https://discuss.elastic.co/t/logstash-tcp-input-expected-behavior-when-event-source-connection-reset/178070/1 "2019-04-23T15:55:42Z")

</div>

When using the [Logstash TCP Input Plugin](https://github.com/logstash-plugins/logstash-input-tcp), what is the expected behavior if the network connection between event source and Logstash is interrupted?

- When the plugin is in client mode, will Logstash attempt to reconnect to the event source periodically? I don't see this happening in the code, but I may not know what I'm looking at.
- When the plugin is in server mode, I assume Logstash will accept a new connection from the event source.  
Thanks for any input.

---

<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:** [April 23, 2019, 4:36pm UTC](https://discuss.elastic.co/t/logstash-tcp-input-expected-behavior-when-event-source-connection-reset/178070/2 "2019-04-23T16:36:56Z")

</div>

In client mode it will try to [reconnect](https://github.com/logstash-plugins/logstash-input-tcp/blob/58d804ba7dc87f48d1d43b413e8f386f1d054421/lib/logstash/inputs/tcp.rb#L201) once a second.

---

<div class="post-metadata">

**Author:** ![freakingid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/freakingid/32/41516_2.png) [@freakingid](https://discuss.elastic.co/u/freakingid)\
**Post date:** [April 23, 2019, 5:19pm UTC](https://discuss.elastic.co/t/logstash-tcp-input-expected-behavior-when-event-source-connection-reset/178070/3 "2019-04-23T17:19:16Z")

</div>

Thanks, especially for the link to relevant spot in code!

---

<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 21, 2019, 5:19pm UTC](https://discuss.elastic.co/t/logstash-tcp-input-expected-behavior-when-event-source-connection-reset/178070/4 "2019-05-21T17:19:18Z")

</div>

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