# Elasticsearch Unreachable \[Manticore::SocketException\] Connection refused

**URL:** <https://discuss.elastic.co/t/elasticsearch-unreachable-manticore-socketexception-connection-refused/185462>\
**Category:** Logstash\
**Created:** [June 12, 2019, 3:46pm UTC](https://discuss.elastic.co/t/elasticsearch-unreachable-manticore-socketexception-connection-refused/185462 "2019-06-12T15:46:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![matejt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matejt/32/64014_2.png) [@matejt](https://discuss.elastic.co/u/matejt)\
**Post date:** [June 12, 2019, 3:46pm UTC](https://discuss.elastic.co/t/elasticsearch-unreachable-manticore-socketexception-connection-refused/185462/1 "2019-06-12T15:46:49Z")

</div>

Hi, I have elasticsearch and logstash running on separate servers.  
Elasticsearch is up and running, and I'm able to issue a curl command from the server where logstash is installed: curl http://my\_ip\_address:9200 and I get a successful response.

However, when starting logstash with the following configuration:

```
input {
     stdin { }
}

output {
    elasticsearch {
        hosts => ["my_ip_address:9200"]
    }
}

```

I get back:  
Client::Pool::HostUnreachableError, :error=\>"Elasticsearch Unreachable: [http://my\_ip\_address:9200/][Manticore::SocketException] Connection refused (Connection refused)"}

Using Elasticsearch and Logstash version: 6.5.4

What may be causing the issue?

---

<div class="post-metadata">

**Author:** ![matejt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matejt/32/64014_2.png) [@matejt](https://discuss.elastic.co/u/matejt)\
**Post date:** [June 12, 2019, 7:02pm UTC](https://discuss.elastic.co/t/elasticsearch-unreachable-manticore-socketexception-connection-refused/185462/2 "2019-06-12T19:02:56Z")

</div>

The issue was solved by passing the proxy value in the configuration file:

```
input {
     stdin { }
}

output {
    elasticsearch {
        hosts => ["my_ip_address:9200"]
        proxy => "http://my_proxy_uri:port"
    }
}
```

---

<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 10, 2019, 7:02pm UTC](https://discuss.elastic.co/t/elasticsearch-unreachable-manticore-socketexception-connection-refused/185462/3 "2019-07-10T19:02:58Z")

</div>

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