# Logstash Pipeline Fails (LF/CR)

**URL:** <https://discuss.elastic.co/t/logstash-pipeline-fails-lf-cr/49056>\
**Category:** Logstash\
**Created:** [May 3, 2016, 12:30pm UTC](https://discuss.elastic.co/t/logstash-pipeline-fails-lf-cr/49056 "2016-05-03T12:30:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pg13](https://avatars.discourse-cdn.com/v4/letter/p/f0a364/32.png) [@pg13](https://discuss.elastic.co/u/pg13)\
**Post date:** [May 3, 2016, 12:30pm UTC](https://discuss.elastic.co/t/logstash-pipeline-fails-lf-cr/49056/1 "2016-05-03T12:30:25Z")

</div>

When processing log files that end with a line feed/carriage return, the pipeline is unable to process the file. The work around is to open the file in some sort of text editor (Notepad++) and manually backspace the resulting blank line and saving the file. Then logstash immediately will process the log.

Is there a better way to process these files, the manual work around is tedious on large numbers of log files. "sed" also seemed ineffective, the notepad++ manual removal is the only way I've been able to figure out how to get these logs to process.

---

<div class="post-metadata">

**Author:** ![pg13](https://avatars.discourse-cdn.com/v4/letter/p/f0a364/32.png) [@pg13](https://discuss.elastic.co/u/pg13)\
**Post date:** [May 3, 2016, 12:52pm UTC](https://discuss.elastic.co/t/logstash-pipeline-fails-lf-cr/49056/2 "2016-05-03T12:52:47Z")

</div>

Another work around is to:  
truncate -s -1

These are workarounds, though, seems like logstash should be able to handle a standard text log file (which normally terminates with a 0x0a)

---

<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:** [July 6, 2017, 4:59am UTC](https://discuss.elastic.co/t/logstash-pipeline-fails-lf-cr/49056/3 "2017-07-06T04:59:32Z")

</div>


