# Enable elasticsearch module from filebeat and trying to send data to elasticsearch but getting below error

**URL:** <https://discuss.elastic.co/t/enable-elasticsearch-module-from-filebeat-and-trying-to-send-data-to-elasticsearch-but-getting-below-error/293654>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [January 6, 2022, 2:30pm UTC](https://discuss.elastic.co/t/enable-elasticsearch-module-from-filebeat-and-trying-to-send-data-to-elasticsearch-but-getting-below-error/293654 "2022-01-06T14:30:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mangeshmj1992](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@mangeshmj1992](https://discuss.elastic.co/u/mangeshmj1992)\
**Post date:** [January 6, 2022, 2:30pm UTC](https://discuss.elastic.co/t/enable-elasticsearch-module-from-filebeat-and-trying-to-send-data-to-elasticsearch-but-getting-below-error/293654/1 "2022-01-06T14:30:42Z")

</div>

Hello team,  
I have enable Elasticsearch module from filebeat and trying to send data to Elasticsearch but getting below error.

Can you please help me here. Username and password is correct. but still showing below error.

```auto
2022-01-06T18:25:50.499+0400 ERROR [publisher_pipeline_output] pipeline/output.go:154 Failed to connect to backoff(elasticsearch(https://IP:9200)): 401 Unauthorized: {"error":{"root_cause":[{"type":"security_exception","reason":"unable to authenticate user [] for REST request [/]","header":{"WWW-Authenticate":["Basic realm=\"security\" charset=\"UTF-8\"","Bearer realm=\"security\"","ApiKey"]}}],"type":"security_exception","reason":"unable to authenticate user [] for REST request [/]","header":{"WWW-Authenticate":["Basic realm=\"security\" charset=\"UTF-8\"","Bearer realm=\"security\"","ApiKey"]}},"status":401}

```

My filebeat Elasticsearch output:

```auto
output.elasticsearch:
 # Array of hosts to connect to.
  hosts : ["https://IP:9200"]
  user : "elastic"
  password : "elastic"
  ssl.certificate_authorities: ["/etc/filebeat/kafka_ca.crt"]
  index: "siem-elk"
  setup.ilm.enabled: auto
  setup.ilm.rollover_alias: "siem-elk"
  setup.ilm.pattern: "{now/d}-000001"

setup.template.name: siem-elk
setup.template.pattern: siem-elk-*

```

---

<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:** [February 3, 2022, 4:31pm UTC](https://discuss.elastic.co/t/enable-elasticsearch-module-from-filebeat-and-trying-to-send-data-to-elasticsearch-but-getting-below-error/293654/2 "2022-02-03T16:31:09Z")

</div>

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