-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logstash keeps retrying after receiving 403 Forbidden from Elasticsearch #10023
Comments
Workaround: In my ingest pipeline, put
This way, any event which would go into previous day's index is discarded. |
Also in Logstash version 6.8.2, even some indication as to which indices the write attempt failed for would be helpful. |
Does anyone know if this has been fixed in the latest version of Logstash? |
I'm wondering if that is still valid since the status code should have changed to 429 in 7.7.0 with elastic/elasticsearch#50166 ? |
likely is, LS retries anything that isn't explicitly handled. current (logstash-output-elasticsearch 10.8.5) behavior:
sounds like (the new) |
Isn't retry for a |
@xeraa current behavior yes. thought your suggestion was that this should not happen for 429 specifically? |
Sorry, my starting point was that But for |
OK, let's close this one and see if |
This has become an issue after Fleet managed metrics TSDB cause 403 Forbidden if metrics data arrives later. It causes logstash to get stuck. |
When Logstash encounters the 403 error from Elasticsearch, it erroneously reattempts to index the document. This document then keeps polluting the output queue, potentially reducing throughput of the entire pipeline.
The correct behaviour is to either place the document into DLQ, or to drop the document entirely.
From RFC 2616 - 10.4.4 403 Forbidden:
I encountered this problem when I set older indices to be read-only, and Logstash picked up some old logs and tried to write them into these old read-only indices.
These messages are logged:
index_settings.index.blocks.write: True
Associated discussion: https://discuss.elastic.co/t/make-logstash-drop-documents-on-403/149977
The text was updated successfully, but these errors were encountered: