# Logstash doesn't auto reconnect to another node ES cluster

**URL:** <https://discuss.elastic.co/t/logstash-doesnt-auto-reconnect-to-another-node-es-cluster/263568>\
**Category:** Elasticsearch\
**Created:** [February 8, 2021, 9:41am UTC](https://discuss.elastic.co/t/logstash-doesnt-auto-reconnect-to-another-node-es-cluster/263568 "2021-02-08T09:41:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lenjeti](https://avatars.discourse-cdn.com/v4/letter/l/ba9def/32.png) [@lenjeti](https://discuss.elastic.co/u/lenjeti)\
**Post date:** [February 8, 2021, 9:41am UTC](https://discuss.elastic.co/t/logstash-doesnt-auto-reconnect-to-another-node-es-cluster/263568/1 "2021-02-08T09:41:19Z")

</div>

We have a 3 node elasticsearch cluster set up. The logstash ouput config looks like this:

```auto
output {
    elasticsearch {
        hosts => ["node1:9200",
                  "node2:9200",
                  "node3:9200"
                  ]
        manage_template => false
        index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
        document_type => "log"
    }

}

```

I had to take down node1 of elasticsearch cluster for some maintenance. However logstash didn't auto connect to the other nodes in the elastic search cluster even though they were up.

I could see the below error in the logstash logs:

[2021-02-03T16:35:50,391][INFO][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck\_url=\>[http://node1:9200/](http://node1:9200/), :path=\>"/"} [2021-02-03T16:35:50,394][WARN][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=\>"[http://node1:9200/](http://node1:9200/)", :error\_type=\>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=\>"Elasticsearch Unreachable: [[http://node1:9200/](http://node1:9200/)][Manticore::SocketException] Connection refused"}

We are using logstash version- 1:6.2.2-1 and elasticsearch- 6.2.2

Are they any settings that can make logstash auto connect to other elastic search nodes that are healthy? Please advise.TIA

---

<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 8, 2021, 9:41am UTC](https://discuss.elastic.co/t/logstash-doesnt-auto-reconnect-to-another-node-es-cluster/263568/2 "2021-03-08T09:41:44Z")

</div>

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