# Logstash stops processing input on malformed JSON line

**URL:** <https://discuss.elastic.co/t/logstash-stops-processing-input-on-malformed-json-line/77662>\
**Category:** Logstash\
**Created:** [March 7, 2017, 1:07pm UTC](https://discuss.elastic.co/t/logstash-stops-processing-input-on-malformed-json-line/77662 "2017-03-07T13:07:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Firass\_Gzayil](https://avatars.discourse-cdn.com/v4/letter/f/90ced4/32.png) [@Firass\_Gzayil](https://discuss.elastic.co/u/Firass_Gzayil)\
**Post date:** [March 7, 2017, 1:07pm UTC](https://discuss.elastic.co/t/logstash-stops-processing-input-on-malformed-json-line/77662/1 "2017-03-07T13:07:08Z")

</div>

Hello!  
I have logstash 5.2.2 reading files containing data in JSON format.  
When logstash encounters a malformed line it throws error and stops processing the whole input

config:  
input { file { path =\> "c:/programdata/monitoring/logs/\*\*/\*.log" codec =\>"json" sincedb\_path =\> "c:/programdata/Shipper/Work/sincedb"} }

Error:

[2017-03-06T17:58:56,723][ERROR][logstash.codecs.json] JSON parse error, original data now in message field {:error=\>#\<LogStash::Json::ParserError: Illegal unquoted character ((CTRL-CHAR, code 9)): has to be escaped using backslash to be included in name  
at [Source: ................MORE............

[2017-03-06T17:58:56,911][ERROR][logstash.codecs.json] JSON parse error, original data now in message field {:error=\>#\<LogStash::Json::ParserError: Unrecognized token ...........MORE.............

Any idea?

---

<div class="post-metadata">

**Author:** ![Firass\_Gzayil](https://avatars.discourse-cdn.com/v4/letter/f/90ced4/32.png) [@Firass\_Gzayil](https://discuss.elastic.co/u/Firass_Gzayil)\
**Post date:** [March 9, 2017, 8:14am UTC](https://discuss.elastic.co/t/logstash-stops-processing-input-on-malformed-json-line/77662/2 "2017-03-09T08:14:03Z")

</div>

Any ideas guys?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 9, 2017, 1:16pm UTC](https://discuss.elastic.co/t/logstash-stops-processing-input-on-malformed-json-line/77662/3 "2017-03-09T13:16:45Z")

</div>

It might be worthwhile trying to use a json filter instead of the json codec, as this may allow you to handle parsing failures more gracefully. I have however not tested it.

---

<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:** [April 6, 2017, 1:16pm UTC](https://discuss.elastic.co/t/logstash-stops-processing-input-on-malformed-json-line/77662/4 "2017-04-06T13:16:52Z")

</div>

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