Skip to content
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

fix #379, add significantly more error logging #380

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

northdpole
Copy link
Contributor

closes #379
adds logs such as:

csearch: ","scanID":"","error":"could not contact Elasticsearch, attempted to retrieve cluster 
info and got status code: 401 as a result, body: [401 Unauthorized] {\"error\":{\"root_cause\":
[{\"type\":\"security_exception\",\"reason\":\"unable to authenticate with provided credentials
 and anonymous access is not allowed for this request\",\"additional_unsuccessful_credentials\"
:\"API key: unable to find apikey with id kkttHpIBE8LvqBqM9yuN\",\"header\":{\"WWW-Authenticate
\":[\"Basic realm=\\\"security\\\", charset=\\\"UTF-8\\\"\",\"Bearer realm=\\\"security\\\"\",\
"ApiKey\"]}}],\"type\":\"security_exception\",\"reason\":\"unable to authenticate with provided
 credentials and anonymous access is not allowed for this request\",\"additional_unsuccessful_c
redentials\":\"API key: unable to find apikey with id kkttHpIBE8LvqBqM9yuN\",\"header\":{\"WWW-
Authenticate\":[\"Basic realm=\\\"security\\\", charset=\\\"UTF-8\\\"\",\"Bearer realm=\\\"secu
rity\\\"\",\"ApiKey\"]}},\"status\":401}"}```

when the api key cannot contact elasticsearch at all

and similar for when the index does not exist

@northdpole northdpole marked this pull request as ready for review September 26, 2024 12:00
@northdpole northdpole force-pushed the 379-helpful-error-logging-es-consumer branch from 913f3ab to dd4a8c6 Compare September 30, 2024 10:58
@northdpole northdpole force-pushed the 379-helpful-error-logging-es-consumer branch from dd4a8c6 to e0c3e73 Compare September 30, 2024 13:32
@northdpole northdpole merged commit dc70704 into main Oct 1, 2024
3 checks passed
@northdpole northdpole deleted the 379-helpful-error-logging-es-consumer branch October 1, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Elasticsearch consumer needs more helpful error logging
2 participants