Logstash与弹性搜索输入循环结果,并总是给出错误“解析请求正文无效” [英] Logstash with elasticsearch input loops results and always gives the error ” Failed to parse request body ”

查看:999
本文介绍了Logstash与弹性搜索输入循环结果,并总是给出错误“解析请求正文无效”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论我如何调整我的基本logstash配置,我都收到这个错误:
错误:[400] {error:{root_cause:[{type :illegal_argument_exception,reason:无法解析请求身体}],type:illegal_argument_exception,reason:无法解析请求体,causes_by:{type:json_parse_exception ,reason:无法识别的令牌**************':在[Source:org。]中期待('true','false'或'null')\\\
弹性搜索.transport.netty4.ByteBufStreamInput@6d67a6bb;行:1,列:30]}},状态:400}



即使我知道结果中只有8个命中,它会不断输出8个结果,直到我杀死logstash脚本,ES不断重新启动...首先我以为是我的查询,但是我即使没有查询,仍然会收到相同的错误:

  input {
elasticsearch {
hosts = > [***,***,*****]
index => index_name_here
user => ****
password => ******
}
}
过滤器{
}
输出{
stdout {
codec => json
}
}

还有,我正在运行Ubuntu 16.04



任何帮助将不胜感激。谢谢!

解决方案

这被确定为错误。详情 here



和修复(在等待审查的时刻): https://github.com/logstash-plugins/logstash-input-elasticsearch/issues/62


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!

解决方案

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

这篇关于Logstash与弹性搜索输入循环结果,并总是给出错误“解析请求正文无效”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆