# Multiline not processing event until pipeline stops

**URL:** https://discuss.elastic.co/t/multiline-not-processing-event-until-pipeline-stops/65561
**Category:** Logstash
**Created:** [November 9, 2016, 9:42pm UTC](https://discuss.elastic.co/t/multiline-not-processing-event-until-pipeline-stops/65561 "2016-11-09T21:42:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![espogian](https://avatars.discourse-cdn.com/v4/letter/e/4491bb/32.png) [@espogian](https://discuss.elastic.co/u/espogian)
#### Post date: [November 9, 2016, 9:42pm UTC](https://discuss.elastic.co/t/multiline-not-processing-event-until-pipeline-stops/65561/1 "2016-11-09T21:42:09Z")

</div>

Hi, with XML files with the following structure:

```
<?xml version="1.0"?>
<tag id="1234">
  ...
</tag>

```

And input config:

```
codec => multiline {
      pattern => "^<\?xml .*\?>"
      negate => true
      what => "previous"
    }

```

Logstash 5 is not processing the event until the pipeline stops. This also applies when processing multiple files.  
To be clear, if I set `stdout { rubydebug }` as output, I don't see nothing until I stop the pipeline.

I think these could apply:

[github.com/driskell/log-courier/issues/38](https://github.com/driskell/log-courier/issues/38)  
[github.com/logstash-plugins/logstash-codec-multiline/issues/3](https://github.com/logstash-plugins/logstash-codec-multiline/issues/3)

And maybe this:

[multiline-not-picking-up-events-immediately/46823/9](https://discuss.elastic.co/t/multiline-not-picking-up-events-immediately/46823/9)

However, consider that my files have a newline at the end. I've tried to cat several files:

```
<?xml version="1.0"?>
<tag id="1234">
  ...
</tag>
<tag id="5678">
  ...
</tag>

```

In that case the last tag is the one which is not being processed until pipeline stops.

Can't figure out how to solve this issue 😑

---

<div class="post-metadata">

### Author: ![espogian](https://avatars.discourse-cdn.com/v4/letter/e/4491bb/32.png) [@espogian](https://discuss.elastic.co/u/espogian)
#### Post date: [November 9, 2016, 11:08pm UTC](https://discuss.elastic.co/t/multiline-not-processing-event-until-pipeline-stops/65561/2 "2016-11-09T23:08:42Z")

</div>

Little update: I've noticed that using the multiline filter with Logstash 2.4.0 everything works fine.  
However, trying the same multiline filter with Logstash 5.5.0 I receive a config error:

`reason=>"Couldn't find any filter plugin named 'multiline'. Are you sure this is correct? Trying to load the multiline filter plugin resulted in this error: LoadError`

---

<div class="post-metadata">

### Author: ![jychen65](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jychen65/32/13140_2.png) [@jychen65](https://discuss.elastic.co/u/jychen65)
#### Post date: [November 14, 2016, 8:08am UTC](https://discuss.elastic.co/t/multiline-not-processing-event-until-pipeline-stops/65561/3 "2016-11-14T08:08:03Z")

</div>

I encountered exactly the same error.  
Does anyone have any idea on how to solve this?

---

<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: [December 12, 2016, 8:08am UTC](https://discuss.elastic.co/t/multiline-not-processing-event-until-pipeline-stops/65561/4 "2016-12-12T08:08:20Z")

</div>

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