# Can't connect filebeat to elastic search

**URL:** <https://discuss.elastic.co/t/cant-connect-filebeat-to-elastic-search/299966>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 17, 2022, 3:25pm UTC](https://discuss.elastic.co/t/cant-connect-filebeat-to-elastic-search/299966 "2022-03-17T15:25:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mariem](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Mariem](https://discuss.elastic.co/u/Mariem)\
**Post date:** [March 17, 2022, 3:25pm UTC](https://discuss.elastic.co/t/cant-connect-filebeat-to-elastic-search/299966/1 "2022-03-17T15:25:35Z")

</div>

this is my filebeat configuration file :

 ![filebeat](https://us1.discourse-cdn.com/elastic/original/3X/5/2/520c93d28c952480444857bb2fb3ff60e7f74d6b.png)

when i execute filebeat setup -e :

 ![error fil](https://us1.discourse-cdn.com/elastic/original/3X/a/1/a1c8b33b85beb06a242756a0133c122533c91173.png)  
Can someone help me???

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [March 17, 2022, 3:51pm UTC](https://discuss.elastic.co/t/cant-connect-filebeat-to-elastic-search/299966/2 "2022-03-17T15:51:46Z")

</div>

Hello,

Please, do not share screenshots, share the configs in plain text using the preformatted text button, `</>`.

You need to check that your Elasticsearch service is running, from your error, it seems that your Elasticsearch is not running.

What is the result of `curl http://localhost:9200` ? What do you have in your Elasticsearch logs.

---

<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:** [April 14, 2022, 5:52pm UTC](https://discuss.elastic.co/t/cant-connect-filebeat-to-elastic-search/299966/3 "2022-04-14T17:52:11Z")

</div>

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