# Logstash Unable to maintain connection to ES

**URL:** <https://discuss.elastic.co/t/logstash-unable-to-maintain-connection-to-es/114974>\
**Category:** Logstash\
**Created:** [January 10, 2018, 10:53pm UTC](https://discuss.elastic.co/t/logstash-unable-to-maintain-connection-to-es/114974 "2018-01-10T22:53:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Austin\_E](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@Austin\_E](https://discuss.elastic.co/u/Austin_E)\
**Post date:** [January 10, 2018, 10:53pm UTC](https://discuss.elastic.co/t/logstash-unable-to-maintain-connection-to-es/114974/1 "2018-01-10T22:53:27Z")

</div>

I setup a stock ES node and a stock Logstash node on the same physical machine(myelastic). I've made 7 changes to the node (node name, cluster name, host, logpath, datapath, locking memory, 31gb of RAM). Kibana can work with the cluster fine and I can access it through my browser. However whenever I run logstash with my config file it constant connects and reconnects never able to push any data to the cluster. A pattern occurs and repeats endlessly. Why is this happening?

```
[2018-01-10T14:50:31,754][WARN][logstash.outputs.elasticsearch] UNEXPECTED POOL ERROR {:e=>#<LogStash::Outputs::ElasticSearch::HttpClient::Pool::NoConnectionAvailableError: No Available connections>}

```

After the above error occurs this series continues endlessly...

```
[2018-01-10T14:50:31,755][ERROR][logstash.outputs.elasticsearch] Attempted to send a bulk request to elasticsearch, but no there are no living connections in the connection pool. Perhaps Elasticsearch is unreachable or down? {:error_message=>"No Available connections", :class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::NoConnectionAvailableError", :will_retry_in_seconds=>2}
[2018-01-10T14:50:32,338][INFO][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://myelastic01:9200/, :path=>"/"}
[2018-01-10T14:50:32,346][WARN][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"http://myelastic01:9200/"}
[2018-01-10T14:50:38,086][WARN][logstash.outputs.elasticsearch] Marking url as dead. Last error: [LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError] Elasticsearch Unreachable: [http://myelastic01:9200/][Manticore::SocketException] Connection reset {:url=>http://myelastic01:9200/, :error_message=>"Elasticsearch Unreachable: [http://myelastic01:9200/][Manticore::SocketException] Connection reset", :error_class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError"}

```

Elastic Output

```
[2018-01-10T13:48:56,087][INFO][o.e.n.Node] [myelastic01-0m] started
[2018-01-10T13:48:56,093][INFO][o.e.g.GatewayService] [myelastic01-0m] recovered [0] indices into cluster_state

```

Logstash Output

```
output {
        if ([type] == "cama-usage") {
                elasticsearch {
                        hosts => [
                                "http://myelastic01:9200"
                        ]
                        index => "cama-usage-%{+YYYY-MM-dd}"
                        document_id => "%{[UniqueID]}"
                        action => "update"
                        doc_as_upsert => true
                }
        }
}
```

---

<div class="post-metadata">

**Author:** ![Austin\_E](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@Austin\_E](https://discuss.elastic.co/u/Austin_E)\
**Post date:** [January 11, 2018, 5:58pm UTC](https://discuss.elastic.co/t/logstash-unable-to-maintain-connection-to-es/114974/2 "2018-01-11T17:58:41Z")

</div>

Bump

---

<div class="post-metadata">

**Author:** ![murlin99](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@murlin99](https://discuss.elastic.co/u/murlin99)\
**Post date:** [January 11, 2018, 6:43pm UTC](https://discuss.elastic.co/t/logstash-unable-to-maintain-connection-to-es/114974/3 "2018-01-11T18:43:15Z")

</div>

Can you post the output section of your logstash config? It looks like it just can not connect to the node.

---

<div class="post-metadata">

**Author:** ![Austin\_E](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@Austin\_E](https://discuss.elastic.co/u/Austin_E)\
**Post date:** [January 11, 2018, 7:40pm UTC](https://discuss.elastic.co/t/logstash-unable-to-maintain-connection-to-es/114974/4 "2018-01-11T19:40:25Z")

</div>

I've updated the post with that data

@murlin99

---

<div class="post-metadata">

**Author:** ![murlin99](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@murlin99](https://discuss.elastic.co/u/murlin99)\
**Post date:** [January 11, 2018, 9:48pm UTC](https://discuss.elastic.co/t/logstash-unable-to-maintain-connection-to-es/114974/5 "2018-01-11T21:48:02Z")

</div>

What output do you get if you curl [http://myelastic01:9200](http://myelastic01:9200)

---

<div class="post-metadata">

**Author:** ![Austin\_E](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@Austin\_E](https://discuss.elastic.co/u/Austin_E)\
**Post date:** [January 11, 2018, 9:53pm UTC](https://discuss.elastic.co/t/logstash-unable-to-maintain-connection-to-es/114974/6 "2018-01-11T21:53:48Z")

</div>

@murlin99 I've updated the post

---

<div class="post-metadata">

**Author:** ![Austin\_E](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@Austin\_E](https://discuss.elastic.co/u/Austin_E)\
**Post date:** [January 12, 2018, 4:23pm UTC](https://discuss.elastic.co/t/logstash-unable-to-maintain-connection-to-es/114974/7 "2018-01-12T16:23:38Z")

</div>

bump

---

<div class="post-metadata">

**Author:** ![Austin\_E](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@Austin\_E](https://discuss.elastic.co/u/Austin_E)\
**Post date:** [January 17, 2018, 9:18pm UTC](https://discuss.elastic.co/t/logstash-unable-to-maintain-connection-to-es/114974/8 "2018-01-17T21:18:46Z")

</div>

bump

---

<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:** [February 14, 2018, 9:18pm UTC](https://discuss.elastic.co/t/logstash-unable-to-maintain-connection-to-es/114974/9 "2018-02-14T21:18:59Z")

</div>

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