Beats connection to elasticsearch

I am trying to start a filebeat on docker to point the output to elasticsearch which is on same docker. While giving the command

docker run docker.elastic.co/beats/filebeat:8.3.2 setup -E setup.kibana.host=192.168.0.109:5601 -E output.elasticsearch.hosts=["192.168.0.109:9200"]

I get error. I am able to ping the server. Also i am able to open kibana from other machine. Error: Exiting: couldn't connect to any of the configured Elasticsearch hosts. Errors: [error connecting to Elasticsearch at http://192.168.0.109:9200 : Get " http://192.168.0.109:9200 ": EOF]. Can someone please tell me what can be the reason?

Welcome to our community! :smiley:

Can you confirm connectivity to Elasticsearch from another host to the IP you have ccnfigured?

Hi,
Yes. When i try to give a curl request from another host on the same network. It is working fine.

Did you try to enter the container and curl from there instead?

Yes still the same issue. Is it regarding the certificate generated by anychance?

curl --cacert http_ca.crt -u elastic https://localhost:9200 this command results in error
Enter host password for user 'elastic':
curl: (60) schannel: CertGetCertificateChain trust error CERT_TRUST_REVOCATION_STATUS_UNKNOWN
More details here: curl - SSL CA Certificates

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

Well, it looks so. You need to install the self-generated cert in your OS.

What about this error? i am unable to connect filebeat to elasticsearch on local machine

Hi,
I installed the certificate generated by elasticsearch. Still the same error when curl request made curl --cacert C:\Users\LENOVO\http_ca.crt -u elastic https://localhost:9200. But when curl hit with insecure it is working fine

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