# Logstash with elasticsearch input loops results and always gives the error " Failed to parse request body "

**URL:** <https://discuss.elastic.co/t/logstash-with-elasticsearch-input-loops-results-and-always-gives-the-error-failed-to-parse-request-body/80947>\
**Category:** Logstash\
**Created:** [April 3, 2017, 6:48am UTC](https://discuss.elastic.co/t/logstash-with-elasticsearch-input-loops-results-and-always-gives-the-error-failed-to-parse-request-body/80947 "2017-04-03T06:48:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hacker\_21](https://avatars.discourse-cdn.com/v4/letter/h/a6a055/32.png) [@hacker\_21](https://discuss.elastic.co/u/hacker_21)\
**Post date:** [April 3, 2017, 6:48am UTC](https://discuss.elastic.co/t/logstash-with-elasticsearch-input-loops-results-and-always-gives-the-error-failed-to-parse-request-body/80947/1 "2017-04-03T06:48:16Z")

</div>

I'm getting this error no matter how I tweak my very basic logstash configuration:  
`Error: [400] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Failed to parse request body"}],"type":"illegal_argument_exception","reason":"Failed to parse request body","caused_by":{"type":"json_parse_exception","reason":"Unrecognized token ' **************': was expecting ('true', 'false' or 'null')\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@6d67a6bb; line: 1, column: 30]"}},"status":400}`

Even if I know there are only 8 "hits" in the results, it will keep outputting the 8 results over and over until I kill the logstash script ... at first, I thought it was my query, but I keep getting the same error even with NO query at all:  
input {  
elasticsearch {  
hosts =\> ["_ **", "", "**"]  
index =\> "index\_name\_here"  
user =\> "_**_"  
password =\> "_**\*\*\*"  
}  
}  
filter {  
}  
output {  
stdout {  
codec =\> json  
}  
}

any help would be greatly appreciated. thank you!

---

<div class="post-metadata">

**Author:** ![Andrei\_Stefan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrei_stefan/32/47533_2.png) [@Andrei\_Stefan](https://discuss.elastic.co/u/Andrei_Stefan)\
**Post date:** [April 6, 2017, 1:15pm UTC](https://discuss.elastic.co/t/logstash-with-elasticsearch-input-loops-results-and-always-gives-the-error-failed-to-parse-request-body/80947/2 "2017-04-06T13:15:38Z")

</div>

Identified as bug: [https://github.com/logstash-plugins/logstash-input-elasticsearch/issues/62](https://github.com/logstash-plugins/logstash-input-elasticsearch/issues/62)

---

<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 4, 2017, 1:15pm UTC](https://discuss.elastic.co/t/logstash-with-elasticsearch-input-loops-results-and-always-gives-the-error-failed-to-parse-request-body/80947/3 "2017-05-04T13:15:38Z")

</div>

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