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

**URL:** <https://discuss.elastic.co/t/since-logstash-2-1-1-i-am-seeing-the-error-undefined-method-close-for-manticore-client-when-ls-starts/36943>\
**Category:** Logstash\
**Created:** [December 11, 2015, 6:18am UTC](https://discuss.elastic.co/t/since-logstash-2-1-1-i-am-seeing-the-error-undefined-method-close-for-manticore-client-when-ls-starts/36943 "2015-12-11T06:18:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamtur01](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jamtur01/32/6575_2.png) [@jamtur01](https://discuss.elastic.co/u/jamtur01)\
**Post date:** [December 11, 2015, 6:18am UTC](https://discuss.elastic.co/t/since-logstash-2-1-1-i-am-seeing-the-error-undefined-method-close-for-manticore-client-when-ls-starts/36943/1 "2015-12-11T06:18:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jamtur01](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jamtur01/32/6575_2.png) [@jamtur01](https://discuss.elastic.co/u/jamtur01)\
**Post date:** [December 11, 2015, 6:41am UTC](https://discuss.elastic.co/t/since-logstash-2-1-1-i-am-seeing-the-error-undefined-method-close-for-manticore-client-when-ls-starts/36943/2 "2015-12-11T06:41:43Z")

</div>

I'm guessing this is related to:

> <https://github.com/elastic/elasticsearch-ruby/commit/7ba1fbdc2285a51fe6447b9241dfc871579dc118>

It in turn references:

> <https://github.com/cheald/manticore/pull/39>

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

---

<div class="post-metadata">

**Author:** ![jamesabbottsmith](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@jamesabbottsmith](https://discuss.elastic.co/u/jamesabbottsmith)\
**Post date:** [December 22, 2015, 6:18am UTC](https://discuss.elastic.co/t/since-logstash-2-1-1-i-am-seeing-the-error-undefined-method-close-for-manticore-client-when-ls-starts/36943/3 "2015-12-22T06:18:18Z")

</div>

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](https://github.com/deviantony/docker-elk)

---

<div class="post-metadata">

**Author:** ![KIVagant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kivagant/32/7182_2.png) [@KIVagant](https://discuss.elastic.co/u/KIVagant)\
**Post date:** [January 18, 2016, 3:15pm UTC](https://discuss.elastic.co/t/since-logstash-2-1-1-i-am-seeing-the-error-undefined-method-close-for-manticore-client-when-ls-starts/36943/4 "2016-01-18T15:15:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![snario](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/snario/32/7214_2.png) [@snario](https://discuss.elastic.co/u/snario)\
**Post date:** [January 18, 2016, 4:10pm UTC](https://discuss.elastic.co/t/since-logstash-2-1-1-i-am-seeing-the-error-undefined-method-close-for-manticore-client-when-ls-starts/36943/5 "2016-01-18T16:10:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![snario](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/snario/32/7214_2.png) [@snario](https://discuss.elastic.co/u/snario)\
**Post date:** [January 18, 2016, 4:48pm UTC](https://discuss.elastic.co/t/since-logstash-2-1-1-i-am-seeing-the-error-undefined-method-close-for-manticore-client-when-ls-starts/36943/6 "2016-01-18T16:48:32Z")

</div>

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.)

---

<div class="post-metadata">

**Author:** ![KIVagant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kivagant/32/7182_2.png) [@KIVagant](https://discuss.elastic.co/u/KIVagant)\
**Post date:** [January 20, 2016, 4:08pm UTC](https://discuss.elastic.co/t/since-logstash-2-1-1-i-am-seeing-the-error-undefined-method-close-for-manticore-client-when-ls-starts/36943/7 "2016-01-20T16:08:24Z")

</div>

Thank you, @snario

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:15am UTC](https://discuss.elastic.co/t/since-logstash-2-1-1-i-am-seeing-the-error-undefined-method-close-for-manticore-client-when-ls-starts/36943/8 "2017-07-06T05:15:02Z")

</div>


