# Elasticsearch output plugin throws error on sniffing =\> true as it makes the pool to empty

**URL:** <https://discuss.elastic.co/t/elasticsearch-output-plugin-throws-error-on-sniffing-true-as-it-makes-the-pool-to-empty/62205>\
**Category:** Logstash\
**Created:** [October 4, 2016, 6:17pm UTC](https://discuss.elastic.co/t/elasticsearch-output-plugin-throws-error-on-sniffing-true-as-it-makes-the-pool-to-empty/62205 "2016-10-04T18:17:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tarini\_Dash](https://avatars.discourse-cdn.com/v4/letter/t/76d3ee/32.png) [@Tarini\_Dash](https://discuss.elastic.co/u/Tarini_Dash)\
**Post date:** [October 4, 2016, 6:17pm UTC](https://discuss.elastic.co/t/elasticsearch-output-plugin-throws-error-on-sniffing-true-as-it-makes-the-pool-to-empty/62205/1 "2016-10-04T18:17:44Z")

</div>

Product : logstash-5.0.0-beta1

With the folowing output configuration I get error when start a pipeline

* * *

## output { elasticsearch { hosts =\> ["x.x.x.x:9200","y.y.y.y:9200"] sniffing =\> true } }

when run as bin/logstash -f pipeline.conf I get below error. **It makes the existing pool to empty.**

[2016-10-03T15:32:44,440][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}  
[2016-10-03T15:32:48,478][INFO][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=\>{:removed=\>["[http://x.x.x.x:9200](http://x.x.x.x:9200)", "[http://y.y.y.y:9200](http://y.y.y.y:9200)"], :added=\>[]}}

Workaround : remove the sniffing setting and add all your client nodes to hosts array.

---

<div class="post-metadata">

**Author:** ![Tegan\_Snyder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tegan_snyder/32/4946_2.png) [@Tegan\_Snyder](https://discuss.elastic.co/u/Tegan_Snyder)\
**Post date:** [October 28, 2016, 6:16pm UTC](https://discuss.elastic.co/t/elasticsearch-output-plugin-throws-error-on-sniffing-true-as-it-makes-the-pool-to-empty/62205/2 "2016-10-28T18:16:28Z")

</div>

I had the same issue 5.0 GA. It appears to remove the URL from the pool. There must be a bug somewhere. Removing the sniffing fixes it for now.

---

<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, 4:32am UTC](https://discuss.elastic.co/t/elasticsearch-output-plugin-throws-error-on-sniffing-true-as-it-makes-the-pool-to-empty/62205/3 "2017-07-06T04:32:06Z")

</div>


