-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Expose logs to systemd users #46900
Comments
Pinging @elastic/es-core-infra |
Relates #17220 |
Interestingly, if I replicate the problem of setting
Whereas in the snippet above we only see the JVM warning line. I should point out however, that I get this from running |
@pugnascotia Note that in our systemd startup script we pass elasticsearch/server/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java Lines 314 to 323 in a2ccb52
elasticsearch/server/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java Lines 344 to 346 in a2ccb52
|
I think closing system error in any situation is a mistake. 🤷♀ |
So we could just stop closing system error, and that should let any errors through to e.g. systemd. We could also print a message about the logs dir, for completeness. |
Yes, I don't think we should passthrough |
Closes elastic#46900. When running ES with --quiet, if ES then exits abnormally, a user has to go hunting in the logs for the error. Instead, never close System.err, and print more information to it if ES encounters a fatal error e.g. config validation, or some fatal runtime exception.
Closes #46900. When running ES with `--quiet`, if ES then exits abnormally, a user has to go hunting in the logs for the error. Instead, never close System.err, and print more information to it if ES encounters a fatal error e.g. config validation, or some fatal runtime exception. This is useful when running under e.g. systemd, since the error will go into the journal. Note that stderr is still closed in daemon (`-d`) mode.
Closes elastic#46900. When running ES with `--quiet`, if ES then exits abnormally, a user has to go hunting in the logs for the error. Instead, never close System.err, and print more information to it if ES encounters a fatal error e.g. config validation, or some fatal runtime exception. This is useful when running under e.g. systemd, since the error will go into the journal. Note that stderr is still closed in daemon (`-d`) mode.
Backport of #47208. Closes #46900. When running ES with `--quiet`, if ES then exits abnormally, a user has to go hunting in the logs for the error. Instead, never close System.err, and print more information to it if ES encounters a fatal error e.g. config validation, or some fatal runtime exception. This is useful when running under e.g. systemd, since the error will go into the journal. Note that stderr is still closed in daemon (`-d`) mode.
We get more than a few posts on the forums like this one complaining about Elasticsearch stopping shortly after starting and quoting the output from
systemd
:Often (as in the post linked above) this is after adjusting
network.host
and the reason Elasticsearch is shutting down is due to a bootstrap check that now fails. However there is no indication here that there is more information in some other logs, and volunteers on the forum must spend time helping users to find this extra information.Can we improve this? For instance, can we expose the location of the Elasticsearch logs in this output? It looks like
stderr
is exposed above, because of theOpenJDK 64-Bit Server VM warning
line. Could we emit a message onstderr
that points the user to the log file? Or maybe we can exposestdout
here too?The text was updated successfully, but these errors were encountered: