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

爱⌒轻易说出口 提交于 2019-12-12 04:22:22

问题


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, ES keeps restarting ... 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 
    }
}

also, I am running Ubuntu 16.04

any help would be greatly appreciated. thank you!


回答1:


This has been identified as bug. Details here.

And a fix (at the moment pending review): https://github.com/logstash-plugins/logstash-input-elasticsearch/issues/62



来源:https://stackoverflow.com/questions/43194114/logstash-with-elasticsearch-input-loops-results-and-always-gives-the-error-fai

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!