# Logstash works but put a lot of 403 errors in log

**URL:** <https://discuss.elastic.co/t/logstash-works-but-put-a-lot-of-403-errors-in-log/278892>\
**Category:** Logstash\
**Created:** [July 16, 2021, 12:05pm UTC](https://discuss.elastic.co/t/logstash-works-but-put-a-lot-of-403-errors-in-log/278892 "2021-07-16T12:05:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SzymonZy](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@SzymonZy](https://discuss.elastic.co/u/SzymonZy)\
**Post date:** [July 16, 2021, 12:05pm UTC](https://discuss.elastic.co/t/logstash-works-but-put-a-lot-of-403-errors-in-log/278892/1 "2021-07-16T12:05:48Z")

</div>

Hello

I have setup els and it seems to work beside many errors:  
"Got response code '403' contacting Elasticsearch at URL '[https://localhost:9200/logstash](https://localhost:9200/logstash)'", : exception=\>LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError

logstash\_writter role has cluster privileges:  
monitor  
manage\_index\_template  
manage\_ilm

on index logstash:  
write, create, create\_index, manage\_ilm, delte.

beats output is setup as follow:  
output {  
elasticsearch {  
hosts =\> ["localhost:9200"]  
ssl =\> true  
user =\> "logstash\_internal"  
password =\> "\*\*\*\*\*\*\*\*\*\*\*\*\*"  
cacert =\> '/etc/logstash/ca.pem'  
}  
}

Verified index setting:  
"index.blocks.read\_only\_allow\_delete": "false"  
so it should be writable

I'm running out of ideas what kind of permission could be missing.

---

<div class="post-metadata">

**Author:** ![AquaX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aquax/32/92006_2.png) [@AquaX](https://discuss.elastic.co/u/AquaX)\
**Post date:** [July 16, 2021, 1:16pm UTC](https://discuss.elastic.co/t/logstash-works-but-put-a-lot-of-403-errors-in-log/278892/2 "2021-07-16T13:16:01Z")

</div>

You should define the name of the index in your output, I suspect that it is trying to create a new index (not named logstash) that the user logstash\_internal does not have the rights to do.

---

<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 13, 2021, 1:17pm UTC](https://discuss.elastic.co/t/logstash-works-but-put-a-lot-of-403-errors-in-log/278892/3 "2021-08-13T13:17:03Z")

</div>

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