# JSON parse error - Java stack trace

**URL:** <https://discuss.elastic.co/t/json-parse-error-java-stack-trace/205858>\
**Category:** Logstash\
**Created:** [October 30, 2019, 12:36pm UTC](https://discuss.elastic.co/t/json-parse-error-java-stack-trace/205858 "2019-10-30T12:36:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DenizParlak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/denizparlak/32/81179_2.png) [@DenizParlak](https://discuss.elastic.co/u/DenizParlak)\
**Post date:** [October 30, 2019, 12:36pm UTC](https://discuss.elastic.co/t/json-parse-error-java-stack-trace/205858/1 "2019-10-30T12:36:36Z")

</div>

Hi,

Logstash version 7.3.1, running with Docker compose.

Firstly, we don't want to use Filebeat to resolve this problem, at least for now. You can see below the output which we don't want like this.

 ![29](https://us1.discourse-cdn.com/elastic/original/3X/d/6/d6021b4ddcb6c48ee6f9d250ae7b8c9b765f7fc5.png)

Here our default pipeline configuration.

input {  
tcp {  
port =\> 5000  
type =\> "json"  
codec =\> "json"  
}

udp {  
port =\> 5000  
type =\> "json"  
codec =\> "json"  
}

}  
output {

stdout { codec =\> rubydebug }  
if "\_grokparsefailure" in [tags] or "\_jsonparsefailure" in [tags] or "scheduling-1" in [thread] {  
elasticsearch {  
hosts =\> ["XX:9200"]  
index =\> "parse-err-%{+YYYY.MM.dd}"  
}  
}

```
    elasticsearch {
            hosts => "XX:9200"
            index => "logstash-%{+YYYY.MM.dd}"
    
    }

```

}

If I don't use this condition:

if "\_grokparsefailure" in [tags] or "\_jsonparsefailure" in [tags] or "scheduling-1" in [thread]

None of these stack traces coming, and our expectation the entire stacktrace should be logged as single event.

How can we resolve this problem?

Kind regards.  
~

---

<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:** [November 27, 2019, 12:36pm UTC](https://discuss.elastic.co/t/json-parse-error-java-stack-trace/205858/2 "2019-11-27T12:36:37Z")

</div>

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