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

Say "ES is not ready" when ES readiness probe fails #8088

Closed
kunisen opened this issue Oct 9, 2024 · 1 comment · Fixed by #8091
Closed

Say "ES is not ready" when ES readiness probe fails #8088

kunisen opened this issue Oct 9, 2024 · 1 comment · Fixed by #8091
Labels
>enhancement Enhancement of existing functionality v2.15.0

Comments

@kunisen
Copy link
Contributor

kunisen commented Oct 9, 2024

Description

ECK is using ES readiness TCP port for readiness check now:
https://www.elastic.co/guide/en/elasticsearch/reference/current/advanced-configuration.html#readiness-tcp-port

However, when ES is not ready, it says Connection refused which is a bit misleading.

nc: connect to 127.0.0.1 port 8080 (tcp) failed: Connection refused

For example, as mentioned in #8042 (comment), disabling xpack.security.http.ssl.enabled causes ES node not deemed to be ready, but it still reports Connection refused error, which is logically hard to correlate the 2 things.

It would be great if we can catch this error and say it in a more user-friendly way, for example,
"ES node is not ready. A node is deemed ready when it has successfully joined a cluster. In a single node configuration, the node is said to be ready, when it’s able to accept requests. Reference: https://www.elastic.co/guide/en/elasticsearch/reference/current/advanced-configuration.html#readiness-tcp-port."

Motivation is to improve the readability of the error message and reduce the potential confusion.

@botelastic botelastic bot added the triage label Oct 9, 2024
@pebrc pebrc added the >enhancement Enhancement of existing functionality label Oct 9, 2024
@botelastic botelastic bot removed the triage label Oct 9, 2024
@pebrc
Copy link
Collaborator

pebrc commented Oct 9, 2024

I think this is a good idea. Given that this is a shell script we can hide away the error and output a custom message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement Enhancement of existing functionality v2.15.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants