# Issues while connecting to HTTPS elastic search url from filebeat

**URL:** <https://discuss.elastic.co/t/issues-while-connecting-to-https-elastic-search-url-from-filebeat/90519>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 22, 2017, 7:10pm UTC](https://discuss.elastic.co/t/issues-while-connecting-to-https-elastic-search-url-from-filebeat/90519 "2017-06-22T19:10:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hanciv](https://avatars.discourse-cdn.com/v4/letter/h/ea666f/32.png) [@Hanciv](https://discuss.elastic.co/u/Hanciv)\
**Post date:** [June 22, 2017, 7:10pm UTC](https://discuss.elastic.co/t/issues-while-connecting-to-https-elastic-search-url-from-filebeat/90519/1 "2017-06-22T19:10:43Z")

</div>

Hi,

I am trying to send my log messages to AWS Elastic search service which is resising in HTTPS. Below is the configuration I have given in filebeat:

output.elasticsearch:

# Array of hosts to connect to.

hosts: ["[XXXXXXXXXXX.es.amazonaws.com](http://XXXXXXXXXXX.es.amazonaws.com)"]  
#[template.name](http://template.name): "filebeat"  
#template.path: "filebeat.template.json"  
#template.overwrite: false

# Optional protocol and basic auth credentials.

protocol: "https"  
#username: "elastic"  
#password: "changeme"

But I am not able to send the messages and getting below error:

ERR Connecting error publishing events (retrying): Get [https://XXXXXXXX.es.amazonaws.com:9200/:](https://XXXXXXXX.es.amazonaws.com:9200/:) net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

As you could see, the ES port 9200 is getting added to URL, but actually the endpoint doesnt have the port..Please help

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [June 23, 2017, 10:20am UTC](https://discuss.elastic.co/t/issues-while-connecting-to-https-elastic-search-url-from-filebeat/90519/2 "2017-06-23T10:20:17Z")

</div>

have you checked with curl or telnet? You need to add the correct port number to the url settings.

---

<div class="post-metadata">

**Author:** ![Hanciv](https://avatars.discourse-cdn.com/v4/letter/h/ea666f/32.png) [@Hanciv](https://discuss.elastic.co/u/Hanciv)\
**Post date:** [June 23, 2017, 8:04pm UTC](https://discuss.elastic.co/t/issues-while-connecting-to-https-elastic-search-url-from-filebeat/90519/3 "2017-06-23T20:04:49Z")

</div>

yes, the port number is correct..

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [June 26, 2017, 11:32am UTC](https://discuss.elastic.co/t/issues-while-connecting-to-https-elastic-search-url-from-filebeat/90519/4 "2017-06-26T11:32:39Z")

</div>

The error indicates filebeat not being able to connect to Elasticsearch even on TCP level (for 60 seconds).

Before sending any events, filebeat is checking if Elasticsearch is reachable.  
Can you try `curl https://XXXXXXXX.es.amazonaws.com:9200` ?

---

<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 24, 2017, 11:33am UTC](https://discuss.elastic.co/t/issues-while-connecting-to-https-elastic-search-url-from-filebeat/90519/5 "2017-07-24T11:33:08Z")

</div>

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