-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Provide a hint to check the logs if the service does not start #61767
Comments
Pinging @elastic/es-distributed (:Distributed/Allocation) |
Pinging @elastic/es-core-infra (:Core/Infra/Core) |
This should be possible. I've marked this for discussion, but I believe this is a trivial change. We just need to write a message with the ES log path to stdout, which will get picked up by journald/systemd. |
Relates #47208. |
We discussed it, and it seem entirely reasonable. |
So it turns out that we do try to print a pointer to the logs. We only do this if Elasticsearch managed to get as far as configuring logging, because there's no point in directing a user to the logs if ES can't have written anything to them. However, we actually need more exception handling here since |
Hmm, there's also |
@pugnascotia It seems we have a bit of overlap between the uncaught exception handler, and the main method return you pointed to above. The uncaught exception handler directly exits, which causes us not to invoke the above. I wonder if we should consolidate these in some way (the exiting) so that when we are prepared to exit, we print the message pointing at the logs, and then use the halt mechanism uncaught exception handler uses now. |
Closes #61767. When Elasticsearch fails to start up, it tries to print a message to suggest to the user that they consult the log for more information. However, if a fatal error is encountered, Elasticsearch exits directly and no such message is printed. Improve this situation by printing the same message when Elasticsearch is about to exit due to a fatal unexpected error.
Closes #61767. When Elasticsearch fails to start up, it tries to print a message to suggest to the user that they consult the log for more information. However, if a fatal error is encountered, Elasticsearch exits directly and no such message is printed. Improve this situation by printing the same message when Elasticsearch is about to exit due to a fatal unexpected error.
Closes elastic#61767. When Elasticsearch fails to start up, it tries to print a message to suggest to the user that they consult the log for more information. However, if a fatal error is encountered, Elasticsearch exits directly and no such message is printed. Improve this situation by printing the same message when Elasticsearch is about to exit due to a fatal unexpected error.
I have noticed an increase in users not able to start Elasticsearch after installation, and they are only providing the response from the service start command. Is it possible to have Elasticsearch return a message like "Please check your Elasticsearch logs for more information." to the output to give people a hint on what to do next. I feel that it'd help reduce a lot of friction and give users guidance.
Here's some recent topics where it would have helped;
https://discuss.elastic.co/t/elasticsearch-service-failed-to-start-on-centos/247034/
https://discuss.elastic.co/t/es-7-9-doesnt-start/246908
https://discuss.elastic.co/t/elastic-search-failed-to-start/246845
The text was updated successfully, but these errors were encountered: