# Beats connection to elasticsearch

**URL:** https://discuss.elastic.co/t/beats-connection-to-elasticsearch/309701
**Category:** Beats
**Tags:** docker, beats-module, filebeat, metricbeat, winlogbeat
**Created:** [July 15, 2022, 4:03am UTC](https://discuss.elastic.co/t/beats-connection-to-elasticsearch/309701 "2022-07-15T04:03:21Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Amiya\_Pani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amiya_pani/32/100717_2.png) [@Amiya\_Pani](https://discuss.elastic.co/u/Amiya_Pani)
#### Post date: [July 15, 2022, 4:03am UTC](https://discuss.elastic.co/t/beats-connection-to-elasticsearch/309701/1 "2022-07-15T04:03:21Z")

</div>

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](http://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](http://192.168.0.109:9200/)**  **: Get "** **[http://192.168.0.109:9200](http://192.168.0.109:9200/)** **": EOF].** Can someone please tell me what can be the reason?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [July 19, 2022, 2:16am UTC](https://discuss.elastic.co/t/beats-connection-to-elasticsearch/309701/2 "2022-07-19T02:16:04Z")

</div>

Welcome to our community! 😃

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

---

<div class="post-metadata">

### Author: ![Amiya\_Pani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amiya_pani/32/100717_2.png) [@Amiya\_Pani](https://discuss.elastic.co/u/Amiya_Pani)
#### Post date: [July 19, 2022, 9:47am UTC](https://discuss.elastic.co/t/beats-connection-to-elasticsearch/309701/3 "2022-07-19T09:47:33Z")

</div>

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

---

<div class="post-metadata">

### Author: ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)
#### Post date: [July 19, 2022, 10:01am UTC](https://discuss.elastic.co/t/beats-connection-to-elasticsearch/309701/4 "2022-07-19T10:01:15Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Amiya\_Pani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amiya_pani/32/100717_2.png) [@Amiya\_Pani](https://discuss.elastic.co/u/Amiya_Pani)
#### Post date: [July 19, 2022, 10:05am UTC](https://discuss.elastic.co/t/beats-connection-to-elasticsearch/309701/5 "2022-07-19T10:05:32Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Amiya\_Pani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amiya_pani/32/100717_2.png) [@Amiya\_Pani](https://discuss.elastic.co/u/Amiya_Pani)
#### Post date: [July 20, 2022, 5:47am UTC](https://discuss.elastic.co/t/beats-connection-to-elasticsearch/309701/6 "2022-07-20T05:47:45Z")

</div>

curl --cacert http\_ca.crt -u elastic [https://localhost:9200](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](https://curl.se/docs/sslcerts.html)

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.

---

<div class="post-metadata">

### Author: ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)
#### Post date: [July 20, 2022, 6:23am UTC](https://discuss.elastic.co/t/beats-connection-to-elasticsearch/309701/7 "2022-07-20T06:23:50Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Amiya\_Pani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amiya_pani/32/100717_2.png) [@Amiya\_Pani](https://discuss.elastic.co/u/Amiya_Pani)
#### Post date: [July 20, 2022, 8:07am UTC](https://discuss.elastic.co/t/beats-connection-to-elasticsearch/309701/8 "2022-07-20T08:07:01Z")

</div>

> [@Amiya\_Pani](#):
>
> 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](http://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](http://192.168.0.109:9200/)**  **: Get "** **[http://192.168.0.109:9200](http://192.168.0.109:9200/)** **": EOF].** Can someone please tell me what can be the reason?

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

---

<div class="post-metadata">

### Author: ![Amiya\_Pani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amiya_pani/32/100717_2.png) [@Amiya\_Pani](https://discuss.elastic.co/u/Amiya_Pani)
#### Post date: [July 20, 2022, 8:30am UTC](https://discuss.elastic.co/t/beats-connection-to-elasticsearch/309701/9 "2022-07-20T08:30:07Z")

</div>

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](https://localhost:9200). But when curl hit with insecure it is working fine

---

<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: [August 17, 2022, 10:30am UTC](https://discuss.elastic.co/t/beats-connection-to-elasticsearch/309701/10 "2022-08-17T10:30:10Z")

</div>

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