# Getting 403 error connecting Logstash to ElasticSearch

**URL:** <https://discuss.elastic.co/t/getting-403-error-connecting-logstash-to-elasticsearch/236750>\
**Category:** Logstash\
**Created:** [June 11, 2020, 4:37pm UTC](https://discuss.elastic.co/t/getting-403-error-connecting-logstash-to-elasticsearch/236750 "2020-06-11T16:37:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ozonshak](https://avatars.discourse-cdn.com/v4/letter/o/eb9ed0/32.png) [@ozonshak](https://discuss.elastic.co/u/ozonshak)\
**Post date:** [June 11, 2020, 4:37pm UTC](https://discuss.elastic.co/t/getting-403-error-connecting-logstash-to-elasticsearch/236750/1 "2020-06-11T16:37:37Z")

</div>

Hello. I'm attempting to connect Logstash to ElasticSearch in a secure manner for the first time. I'm following the instructions here:

[https://www.elastic.co/guide/en/logstash/current/ls-security.html](https://www.elastic.co/guide/en/logstash/current/ls-security.html)

I keep getting this error:

```auto
LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError: Got response code '403' contacting Elasticsearch at URL 'http://###.##.###.###:9243/logstash'

```

I believe I have my user created and setup correctly. Here are the permissions for the role:

 ![logstash_user_role](https://us1.discourse-cdn.com/elastic/original/3X/f/a/fa14fe547b426ee7c14bea83c951e9291dd1e6af.jpeg)

If I use the "elastic" super user, it seems to work fine. So, I must be missing a permission. As far as I can tell, I set this up just like the documentation, so I'm not sure what I'm missing here. If anyone can see anything obvious, please let me know. I would prefer not using the super user for everything 🙂

---

<div class="post-metadata">

**Author:** ![ozonshak](https://avatars.discourse-cdn.com/v4/letter/o/eb9ed0/32.png) [@ozonshak](https://discuss.elastic.co/u/ozonshak)\
**Post date:** [June 11, 2020, 4:47pm UTC](https://discuss.elastic.co/t/getting-403-error-connecting-logstash-to-elasticsearch/236750/2 "2020-06-11T16:47:58Z")

</div>

Sorry, never mind. I literally found the solution right after posting this. The solution is here:

[https://www.gitmemory.com/issue/elastic/logstash/10722/486614924](https://www.gitmemory.com/issue/elastic/logstash/10722/486614924)

Elastic might need to update their online documentation a bit to cover this.

---

<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:** [July 9, 2020, 4:48pm UTC](https://discuss.elastic.co/t/getting-403-error-connecting-logstash-to-elasticsearch/236750/3 "2020-07-09T16:48:00Z")

</div>

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