# Lost connection when adding filter files and patterns in logstash

**URL:** <https://discuss.elastic.co/t/lost-connection-when-adding-filter-files-and-patterns-in-logstash/81654>\
**Category:** Logstash\
**Created:** [April 7, 2017, 6:57pm UTC](https://discuss.elastic.co/t/lost-connection-when-adding-filter-files-and-patterns-in-logstash/81654 "2017-04-07T18:57:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![aziz\_007](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@aziz\_007](https://discuss.elastic.co/u/aziz_007)\
**Post date:** [April 7, 2017, 6:57pm UTC](https://discuss.elastic.co/t/lost-connection-when-adding-filter-files-and-patterns-in-logstash/81654/1 "2017-04-07T18:57:26Z")

</div>

i work with zimbra i have created a grok filter for mailbox.log and a pattern file

i have put the filter file called zimbra\_mailbox.conf in /etc/logstash/conf.d/  
and i have created a directory called patterns in /etc/logstash/ and puted the pattern file into it

and i made this commande chown logstash:logstash /etc/logstash/patterns/zimbra

but when i open logsatsh-forwader.err to see how the transfer of log is going but i get lost connection connection failure ☹  
could you help me please to know where is my problem

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 12, 2017, 5:22am UTC](https://discuss.elastic.co/t/lost-connection-when-adding-filter-files-and-patterns-in-logstash/81654/2 "2017-04-12T05:22:42Z")

</div>

Please show the exact error message you get.

---

<div class="post-metadata">

**Author:** ![aziz\_007](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@aziz\_007](https://discuss.elastic.co/u/aziz_007)\
**Post date:** [April 12, 2017, 5:52pm UTC](https://discuss.elastic.co/t/lost-connection-when-adding-filter-files-and-patterns-in-logstash/81654/3 "2017-04-12T17:52:44Z")

</div>

this is what i get

2017/04/12 19:51:02.154449 Connecting to [192.168.1.103]:5043 (192.168.1.103)  
2017/04/12 19:51:17.155362 Failure connecting to 192.168.1.103: dial tcp 192.168.1.103:5043: i/o timeout

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 13, 2017, 7:16am UTC](https://discuss.elastic.co/t/lost-connection-when-adding-filter-files-and-patterns-in-logstash/81654/4 "2017-04-13T07:16:56Z")

</div>

Looks like a network connectivity issue. Have you verified that you can connect outside of Filebeat but on the same machine?

---

<div class="post-metadata">

**Author:** ![aziz\_007](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@aziz\_007](https://discuss.elastic.co/u/aziz_007)\
**Post date:** [April 13, 2017, 8:35am UTC](https://discuss.elastic.co/t/lost-connection-when-adding-filter-files-and-patterns-in-logstash/81654/5 "2017-04-13T08:35:30Z")

</div>

i am not using filea beat ima using logstash-forwarder

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 13, 2017, 9:59am UTC](https://discuss.elastic.co/t/lost-connection-when-adding-filter-files-and-patterns-in-logstash/81654/6 "2017-04-13T09:59:22Z")

</div>

That shouldn't make a difference in this case. Anyway, logstash-forwarder is deprecated and should be replaced by Filebeat whenever possible.

---

<div class="post-metadata">

**Author:** ![aziz\_007](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@aziz\_007](https://discuss.elastic.co/u/aziz_007)\
**Post date:** [April 13, 2017, 10:07am UTC](https://discuss.elastic.co/t/lost-connection-when-adding-filter-files-and-patterns-in-logstash/81654/7 "2017-04-13T10:07:21Z")

</div>

i see but i could not get the problem if i don't add the filters and patterns it works but when i add them it give me that erreur please can you help me

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 14, 2017, 8:14am UTC](https://discuss.elastic.co/t/lost-connection-when-adding-filter-files-and-patterns-in-logstash/81654/8 "2017-04-14T08:14:40Z")

</div>

Have you looked in Logstash's log to see if it reports any problems?

---

<div class="post-metadata">

**Author:** ![aziz\_007](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@aziz\_007](https://discuss.elastic.co/u/aziz_007)\
**Post date:** [April 14, 2017, 1:56pm UTC](https://discuss.elastic.co/t/lost-connection-when-adding-filter-files-and-patterns-in-logstash/81654/9 "2017-04-14T13:56:27Z")

</div>

i have installed filebeat and the problem seems to be resolved and i added a new filter of zimbra under /etc/logstash/conf.d  
and i added a pattern file in /etc/logstash/patterns  
and filebeat is forwarding the files but how can i a see the new filed added by the filter 🙂

---

<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 12, 2017, 2:05pm UTC](https://discuss.elastic.co/t/lost-connection-when-adding-filter-files-and-patterns-in-logstash/81654/10 "2017-05-12T14:05:09Z")

</div>

Closed on May 12, 2017, 2:05pm UTC

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