2016-07-22 43 views
5

Elasticsearch 5受xpack安全保護,並且與ldap掛鉤,工作正常。即使用戶擁有role_mapping的管理權限。Logstash 5 Alpha4 to elasticsearch5 Alpha4通信錯誤

Logstash 5配置是如下

output { 
    elasticsearch { 
    hosts => ['localhost:9200'] 
    user => '[email protected]' 
    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_ 
+0

這在ES 5.1和logstash 5.1上發生。 – Brad

+1

你可以用'--debug'運行logstash並提供完整的日誌嗎? – Val

+0

這是否在啓動時馬上發生?此外,你似乎是使用ES 5的4.4.1輸出,或者我只是被日誌困惑?查看新下載的Logstash 5.1.1,輸出插件版本應爲5.4.0而不是4.1.1 – pandaadb

回答

1

我想我可能已經想通了。我正在使用Logstash 5.1.1-alpine docker鏡像。據我所知,它帶有elasticsearch-output插件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 

與更新的插件,我再也看不到這個錯誤。