Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logstash 5 Alpha4 to elasticsearch5 Alpha4 communication error

Elasticsearch 5 is secured with xpack security and hooked with ldap which is working fine. Even user has admin right in role_mapping.

Logstash 5 configuration is as below

output {
  elasticsearch {
    hosts => ['localhost:9200']
    user => '[email protected]'
    password => 'pwd'
  }
}

Getting below error and because of which logstash is not able to pass data to 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_
like image 694
Gaurav J Avatar asked Nov 09 '22 11:11

Gaurav J


1 Answers

I think I may have figured it out. I am using the Logstash 5.1.1-alpine docker image. As far as I can tell, it comes with the elasticsearch-output plugin v4.5.0, which seems to have this bug. Forcing an update of that plugin to the latest (6.2) has fixed this issue.

My Dockerfile now

FROM logstash:5.1.1-alpine

RUN $LOGSTASH_PATH/logstash-plugin install --version 6.2.0 logstash-output-elasticsearch

With the updated plugin, I no longer see this error.

like image 127
Brad Avatar answered Nov 15 '22 10:11

Brad