Since Logstash 2.1.1 I am seeing the error 'undefined method close for #<Manticore::Client:' when LS starts

Since i upgraded to Logstash 2.1.1 I am seeing the following when LS starts:

{:timestamp=>"2015-12-11T06:01:55.371000+0000", :message=>"undefined method close' for #Manticore::Client:0x211f70d7", :class=>"NoMethodError", :backtrace=>["/opt/logstash/vendor/bundle/jruby/1.9/gems/elasticsearch-transport-1.0.15/lib/elasticsearch/transport/transport/http/manticore.rb:115:in __close_connections', "org/jruby/RubyArray.java:1613:in each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/elasticsearch-transport-1.0.15/lib/elasticsearch/transport/transport/http/manticore.rb:115:in __close_connections'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/elasticsearch-transport-1.0.15/lib/elasticsearch/transport/transport/base.rb:99:in __rebuild_connections'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/elasticsearch-transport-1.0.15/lib/elasticsearch/transport/transport/base.rb:77:in reload_connections!'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.2.0-java/lib/logstash/outputs/elasticsearch/http_client.rb:85:in sniff!'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.2.0-java/lib/logstash/outputs/elasticsearch/http_client.rb:73:in start_sniffing!'", "org/jruby/ext/thread/Mutex.java:149:in synchronize'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.2.0-java/lib/logstash/outputs/elasticsearch/http_client.rb:73:in start_sniffing!'", "org/jruby/RubyKernel.java:1479:in `loop'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.2.0-java/lib/logstash/outputs/elasticsearch/http_client.rb:72:in start_sniffing!'"], :level=>:error, :file=>"logstash/outputs/elasticsearch/http_client.rb", :line=>"89", :method=>"sniff!"}

ES is 2.1.0 on the other end.

1 Like

I'm guessing this is related to:

It in turn references:

Which is in manticore 0.5.2. The current manticore version in 2.1.1 is 0.4.4.

1 Like

I'm getting the same error from logstash. For me it occurs when I add the following to my configuration

elasticsearch {
    hosts => "elasticsearch:9200"
    sniffing => true
    manage_template => false
    index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
    document_type => "%{[@metadata][type]}"
}

If I send the output directly, without setting the index etc it works OK.

I'm using docker, based on https://github.com/deviantony/docker-elk

1 Like

Hello, I'm getting this error too when I working with beats.

1 Like

Same error here, is there a workaround? I don't know how to proceed if I remove the index field like @jamesabbottsmith mentioned.

UPDATE: If your use case is just one node (not a cluster of elasticsearch instances, just go ahead and remove the sniffing param and it iwll work.)

2 Likes

Thank you, @snario