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

Detect and log failed credentials #115

Open
tvedtorama opened this issue Feb 17, 2020 · 4 comments
Open

Detect and log failed credentials #115

tvedtorama opened this issue Feb 17, 2020 · 4 comments

Comments

@tvedtorama
Copy link

When I use wrong credentials for Elastic, the checkEsConnection function will retry the check forever. This does not give a clue that the logging is not active due to invalid credentials, which could give a false sense of allrightness.

Exit the retryloop and log when the server returns 401?

@vanthome
Copy link
Owner

vanthome commented Apr 7, 2020

have you tried to listen to the error event via .on('error', ...) ?

@tvedtorama
Copy link
Author

Yes, but I don't think the failed credentials issue end up there - it just keeps trying, as if the Es server is temporarily down.

@Munawwar
Copy link
Contributor

Munawwar commented Jun 9, 2020

If there was a way to detect intermittent errors vs permanent errors I could implement this

I guess here are some ideas to filter them for retry:

  • TimeoutError, ConnectionError
  • 408 request timeout
  • 429 too many requests
  • 5xx http status codes (mostly 500,502,503,504)

Not sure about "No living connection" error (means probably no ES is running)

@TomChv
Copy link
Contributor

TomChv commented Nov 3, 2020

Hi @vanthome, can you publish the last version of the lib on npm ? I would like to use the library with my previous MR that fix this bug

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

No branches or pull requests

4 participants