# Unexpected pool error

**URL:** <https://discuss.elastic.co/t/unexpected-pool-error/74340>\
**Category:** Logstash\
**Created:** [February 8, 2017, 8:30am UTC](https://discuss.elastic.co/t/unexpected-pool-error/74340 "2017-02-08T08:30:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![111126](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111126/32/36818_2.png) [@111126](https://discuss.elastic.co/u/111126)\
**Post date:** [February 8, 2017, 8:30am UTC](https://discuss.elastic.co/t/unexpected-pool-error/74340/1 "2017-02-08T08:30:33Z")

</div>

hello!

I have logstash, elastic verison 5.2  
My elastic - there is cluster with two nodes (ip adress x.x.x.x and y.y.y.y).  
My output logstash config:

```
> elasticsearch {
> hosts => "example.com:80"
> index => "223ab-xyz-%{+YYYY.MM}"
> template => "/opt/logstash/custom_patterns/elasticsearch-template_223.json"
> template_name => "223"
> user => "elastic"
> password => "changeme"
> sniffing => false
> flush_size => "2000"
> }

```

And I use nginx with next settings [https://www.elastic.co/blog/playing-http-tricks-nginx](https://www.elastic.co/blog/playing-http-tricks-nginx)

Result, I have periodically error in logstash log like this:

```
[2017-02-08T00:54:50,941][WARN][logstash.outputs.elasticsearch] Marking url as dead. Last error: [LogStash::Outputs::ElasticSearch::
HttpClient::Pool::HostUnreachableError] Elasticsearch Unreachable: [http://elastic:xxxxxx@example.com/][Manticore::SocketTimeout] Read ti
med out {:url=>http://elastic:xxxxxx@example.com/, :error_message=>"Elasticsearch Unreachable: [http://elastic:xxxxxx@example.com/][Manticore
::SocketTimeout] Read timed out", :error_class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError"}
[2017-02-08T00:54:50,941][ERROR][logstash.outputs.elasticsearch] Attempted to send a bulk request to elasticsearch' but Elasticsearch
 appears to be unreachable or down! {:error_message=>"Elasticsearch Unreachable: [http://elastic:xxxxxx@example.com/][Manticore::SocketTi
meout] Read timed out", :class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError", :will_retry_in_seconds=>2
}
[2017-02-08T00:54:51,268][WARN][logstash.outputs.elasticsearch] UNEXPECTED POOL ERROR {:e=>#<LogStash::Outputs::ElasticSearch::HttpC
lient::Pool::NoConnectionAvailableError: No Available connections>}
[2017-02-08T00:54:52,336][INFO][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://elastic:xxxxxx@example.com/, :path=>"/"}
[2017-02-08T00:54:52,341][WARN][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>#<URI::HTTP:0x42bc4340 URL:http://elastic:xxxxxx@example.com/>}
[2017-02-08T00:56:40,519][WARN][logstash.outputs.elasticsearch] Marking url as dead. Last error: [LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError] Elasticsearch Unreachable: [http://elastic:xxxxxx@example.com/][Manticore::SocketTimeout] Read timed out {:url=>http://elastic:xxxxxx@example.com/, :error_message=>"Elasticsearch Unreachable: [http://elastic:xxxxxx@example.com/][Manticore::SocketTimeout] Read timed out", :error_class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError"}

```

And the next error in nginx error log:

```
2017/02/07 02:45:54 [error] 11371#11371: *29115 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server: example.com, request: "POST /_bulk HTTP/1.1", upstream: "http://y.y.y.y:9200/_bulk", host:
"example.com"
2017/02/07 02:45:55 [error] 11371#11371: *29119 no live upstreams while connecting to upstream, client: x.x.x.x, server: example.com, request: "POST /_bulk HTTP/1.1", upstream: "http://local/_bulk", host: "example.com"
2017/02/07 02:46:00 [error] 11371#11371: *29119 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server: example.com, request: "POST /_bulk HTTP/1.1", upstream: "http://x.x.x.x:9200/_bulk", host:
"example.com"
2017/02/07 02:46:00 [error] 11371#11371: *29119 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server: example.com, request: "POST /_bulk HTTP/1.1", upstream: "http://y.y.y.y:9200/_bulk", host:
"example.com"
2017/02/07 02:46:02 [error] 11371#11371: *29115 no live upstreams while connecting to upstream, client: x.x.x.x, server: example.com, request: "POST /_bulk HTTP/1.1", upstream: "http://local/_bulk", host: "example.com"
2017/02/07 02:46:05 [error] 11371#11371: *29119 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server: example.com, request: "POST /_bulk HTTP/1.1", upstream: "http://x.x.x.x:9200/_bulk", host:
"example.com"
2017/02/07 02:46:05 [error] 11371#11371: *29119 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server: example.com, request: "POST /_bulk HTTP/1.1", upstream: "http://y.y.y.y:9200/_bulk", host:
"example.com"

```

How can I fix it?

---

<div class="post-metadata">

**Author:** ![111126](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111126/32/36818_2.png) [@111126](https://discuss.elastic.co/u/111126)\
**Post date:** [February 9, 2017, 7:52pm UTC](https://discuss.elastic.co/t/unexpected-pool-error/74340/2 "2017-02-09T19:52:01Z")

</div>

Can Anybody help me?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 12, 2017, 6:27pm UTC](https://discuss.elastic.co/t/unexpected-pool-error/74340/3 "2017-02-12T18:27:49Z")

</div>

Well, it appears that Logstash can't connect with ast least one of your servers. This is probably not a Logstash problem but rather a problem with the network between your hosts, Elasticsearch itself, or (possibly) Nginx if you're using it as a reverse proxy.

---

<div class="post-metadata">

**Author:** ![111126](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111126/32/36818_2.png) [@111126](https://discuss.elastic.co/u/111126)\
**Post date:** [February 22, 2017, 5:53am UTC](https://discuss.elastic.co/t/unexpected-pool-error/74340/4 "2017-02-22T05:53:09Z")

</div>

Ok. How can I find my problem?  
I have elastic 4 data nodes, and I think they have must to work without problem

---

<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:** [March 22, 2017, 5:53am UTC](https://discuss.elastic.co/t/unexpected-pool-error/74340/5 "2017-03-22T05:53:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
