# LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=\>"Elasticsearch Unreachable: \[http://localhost:9200/\]

**URL:** <https://discuss.elastic.co/t/logstash-outputs-elasticsearch-httpclient-pool-hostunreachableerror-error-elasticsearch-unreachable-http-localhost-9200/118674>\
**Category:** Elasticsearch\
**Created:** [February 6, 2018, 3:39pm UTC](https://discuss.elastic.co/t/logstash-outputs-elasticsearch-httpclient-pool-hostunreachableerror-error-elasticsearch-unreachable-http-localhost-9200/118674 "2018-02-06T15:39:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shahnaz\_Shariff](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Shahnaz\_Shariff](https://discuss.elastic.co/u/Shahnaz_Shariff)\
**Post date:** [February 6, 2018, 3:39pm UTC](https://discuss.elastic.co/t/logstash-outputs-elasticsearch-httpclient-pool-hostunreachableerror-error-elasticsearch-unreachable-http-localhost-9200/118674/1 "2018-02-06T15:39:31Z")

</div>

I installed x-pack on elasticsearch, kibana, and logstash.

Elasticsearch.yml

```
bootstrap.memory_lock: true
transport.host: localhost
transport.tcp.port: 9300
network.host: 0.0.0.0
http.port: 9200
xpack.ssl.keystore.path: certs/elastic-certificates.p12
xpack.ssl.truststore.path: certs/elastic-certificates.p12
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate

```

Kibana.yml

```
server.port:5601
server.host: xx.xx.xx.xx
elasticsearch.url: "http://xx.xx.xx.xx:9200/"
elasticsearch.requestTimeout: 90000`
elasticsearch.username: "kibana"
elasticsearch.password: <pwd_generated>

```

Logstash.yml

```
pipeline.workers: 4
pipeline.batch.size: 5
pipeline.batch.delay: 300
xpack.monitoring.enabled: true
xpack.monitoring.elasticsearch.url: http://xx.xx.xx.xx:9200/
xpack.monitoring.elasticsearch.username: logstash_system
xpack.monitoring.elasticsearch.password: <pwd_generated>

```

Logstash config file:

```
input { stdin { codec => plain { charset => "ISO-8859-1" } } }

filter { }

output {
  elasticsearch {
        hosts => ["http://xx.xx.xx.xx:9200"]
        user => "elastic"
        password => <modified_pwd>
         }
  stdout { codec => rubydebug }
}

```

With this setting, I started elasticsearch, kibana, and logstash. Data was written into the index for about 10 mins and then it starts throwing this error:

[2018-02-05T23:20:02,277][INFO][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck\_url=\>[http://localhost:9200/](http://localhost:9200/), :path=\>"/"}  
[2018-02-05T23:20:02,280][WARN][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error. {:url=\>"[http://localhost:9200/](http://localhost:9200/)", :error\_type=\>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=\>"Elasticsearch Unreachable: [[http://localhost:9200/](http://localhost:9200/)][Manticore::SocketException] Connection refused (Connection refused)"}

Any help will be appreciated! Thanks!

---

<div class="post-metadata">

**Author:** ![codetrane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/codetrane/32/19983_2.png) [@codetrane](https://discuss.elastic.co/u/codetrane)\
**Post date:** [February 6, 2018, 4:54pm UTC](https://discuss.elastic.co/t/logstash-outputs-elasticsearch-httpclient-pool-hostunreachableerror-error-elasticsearch-unreachable-http-localhost-9200/118674/2 "2018-02-06T16:54:51Z")

</div>

> [@Shahnaz\_Shariff](#):
>
> network.host: 0.0.0.0  
> transport.host: localhost

Hi, I am just guessing since I am not sure what's your real set up, but I am seeing you have these 2 configs. Have you tried to use the IP instead?.

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [February 7, 2018, 12:21am UTC](https://discuss.elastic.co/t/logstash-outputs-elasticsearch-httpclient-pool-hostunreachableerror-error-elasticsearch-unreachable-http-localhost-9200/118674/3 "2018-02-07T00:21:01Z")

</div>

> [@Shahnaz\_Shariff](#):
>
> [2018-02-05T23:20:02,280][WARN][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error. {:url=\>"[http://localhost:9200/](http://localhost:9200/)", :error\_type=\>LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError, :error=\>"Elasticsearch Unreachable: [[http://localhost:9200/](http://localhost:9200/)][Manticore::SocketException] Connection refused (Connection refused)"}

That error looks like it's coming from Logstash monitoring.  
Trying configuring `xpack.monitoring.elasticsearch.url` (as well as `.username` and `.password`)

- [Configuring Monitoring for Logstash Nodes | Logstash Reference [6.1] | Elastic](https://www.elastic.co/guide/en/logstash/6.1/configuring-logstash.html#monitoring-general-settings)

---

<div class="post-metadata">

**Author:** ![ryext](https://avatars.discourse-cdn.com/v4/letter/r/a9a28c/32.png) [@ryext](https://discuss.elastic.co/u/ryext)\
**Post date:** [February 21, 2018, 8:25am UTC](https://discuss.elastic.co/t/logstash-outputs-elasticsearch-httpclient-pool-hostunreachableerror-error-elasticsearch-unreachable-http-localhost-9200/118674/4 "2018-02-21T08:25:53Z")

</div>

i have the same issue.  
but my elastic search is on localhost:9200  
i creater the itenral user gave it the writter role added it to the .conf  
and to the logstash.yml i added the logstash\_system which i previously set a password for.

---

<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 21, 2018, 8:25am UTC](https://discuss.elastic.co/t/logstash-outputs-elasticsearch-httpclient-pool-hostunreachableerror-error-elasticsearch-unreachable-http-localhost-9200/118674/5 "2018-03-21T08:25:57Z")

</div>

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