# Failed to connect to elasticsearch from logstash

**URL:** <https://discuss.elastic.co/t/failed-to-connect-to-elasticsearch-from-logstash/71909>\
**Category:** Logstash\
**Created:** [January 17, 2017, 9:01pm UTC](https://discuss.elastic.co/t/failed-to-connect-to-elasticsearch-from-logstash/71909 "2017-01-17T21:01:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nanshan](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@nanshan](https://discuss.elastic.co/u/nanshan)\
**Post date:** [January 17, 2017, 9:01pm UTC](https://discuss.elastic.co/t/failed-to-connect-to-elasticsearch-from-logstash/71909/1 "2017-01-17T21:01:58Z")

</div>

I have ELB: elasticsearch-data.dev-ore, and there are 3 easlticsearch-nodes behind it.

```auto
20:58:33 dev-ore-logstash-i-bef580a6 root ~ > telnet elasticsearch-data.dev-ore 9200
Trying 10.0.19.78...
Connected to elasticsearch-data.dev-ore 
Escape character is '^]'.
^]
HTTP/1.0 404 Not Found
content-type: application/json; charset=UTF-8
content-length: 367

{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","resource.type":"index_or_alias","resource.id":"bad-request","index":"bad-request"}],"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","resource.type":"index_or_alias","resource.id":"bad-request","index":"bad-request"},"status":404}Connection closed by foreign host.

```

It said it was connected to at the first and then closed it due to index\_not\_found\_exception.

I am confused why?

---

<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:** [January 18, 2017, 6:45am UTC](https://discuss.elastic.co/t/failed-to-connect-to-elasticsearch-from-logstash/71909/2 "2017-01-18T06:45:39Z")

</div>

Why are you using telnet instead of e.g. curl to talk to ES? Judging by what you've pasted above you're not placing a valid HTTP request at all so I'm not sure what you expect would happen.

---

<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 15, 2017, 6:45am UTC](https://discuss.elastic.co/t/failed-to-connect-to-elasticsearch-from-logstash/71909/3 "2017-02-15T06:45:43Z")

</div>

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