Logstash 5 Alpha4到elasticsearch5 Alpha4.通信错误



Elasticsearch 5使用xpack安全性进行安全保护,并使用ldap进行挂钩,运行良好。即使用户在role_mapping中也有管理权限。

Logstash 5配置如下

output {
  elasticsearch {
    hosts => ['localhost:9200']
    user => 'gaurav@gmail.com'
    password => 'pwd'
  }
}

获取以下错误,因此logstash无法将数据传递给elasticsearch。

{:timestamp=>"2016-07-14T16:32:29.592000+0530", 
:message=>"Encountered an unexpected error submitting a bulk request! Will retry.", 
:error_message=>"undefined method code' for #", 
:class=>"NoMethodError", :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-4.1.1-java/lib/logstash/outputs/elasticsearch/common.rb:217:insafe_bulk'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-4.1.1-java/lib/logstash/outputs/elasticsearch/common.rb:105:in submit'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-4.1.1-java/lib/logstash/outputs/elasticsearch/common.rb:72:inretrying_submit'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-4.1.1-java/lib/logstash/outputs/elasticsearch/common.rb:23:in multi_receive'", "org/jruby/RubyArray.java:1653:ineach_slice'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-4.1.1-java/lib/logstash/outputs/elasticsearch/common.rb:22:in multi_receive'", "/usr/share/logstash/logstash-core/lib/logstash/output_delegator.rb:136:inthreadsafe_multi_receive'", "/usr/share/logstash/logstash-core/lib/logstash/output_

我想我可能已经想通了。我使用的是Logstash 5.1.1-阿尔卑斯码头工人的图像。据我所知,它附带了elasticsearch输出插件v4.5.0,它似乎有这个bug。强制将该插件更新到最新版本(6.2)已经解决了这个问题。

我的Dockerfile现在是

FROM logstash:5.1.1-alpine
RUN $LOGSTASH_PATH/logstash-plugin install --version 6.2.0 logstash-output-elasticsearch

有了更新的插件,我再也看不到这个错误了。

相关内容

  • 没有找到相关文章

最新更新