Poor error handling in Elasticsearch exporter of incorrect response parsing #10970
Labels
kind/bug
Categorizes an issue or PR as a bug
severity/low
Marks a bug as having little to no noticeable impact for the user
support
Marks an issue as related to a customer support request
version:8.1.4
Marks an issue as being completely or in parts released in 8.1.4
version:8.2.0-alpha2
Marks an issue as being completely or in parts released in 8.2.0-alpha2
version:8.2.0
Marks an issue as being completely or in parts released in 8.2.0
Describe the bug
If you configure Elastic behind a reverse proxy, or in any way which would cause your request to be redirected, you may some time send a request in the exporter (whether exporting a bulk, or putting an index template) and receive HTML.
If you see such an error when parsing a response, e.g.
This is highly likely because the server returned HTML (or possible XML, but less likely).
In this case, as there was no request error, it means the server returned something between 200 and 399. The root cause is not yet clear.
To Reproduce
Still unsure, I will try to get this from the support case. However, I can say that it is connecting Zeebe to an external, self-managed Elasticsearch (so not deployed via the Helm charts). The version however should be compatible, 7.13.x.
Expected behavior
If it happens to be a redirect, we should handle redirects properly. If the response is truly invalid JSON, then we should print out the raw response in the exception so we can diagnose what's happening.
Log/Stacktrace
Full Stacktrace
Environment:
The text was updated successfully, but these errors were encountered: