Issues while connecting to HTTPS elastic search url from filebeat

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"]
#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/: 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

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

yes, the port number is correct..

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 ?

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