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
Pause command in elasticsearch.in.bat not friendly to automated processes #8913
Comments
Instead of adding another script, maybe can we add a quiet/silent option to the existing script? Something like |
Could we detect that JAVA_HOME is not set and fail? |
@dadoonet That's already the case. The issue here is a |
My bad. Can we remove it in https://github.com/elasticsearch/elasticsearch/blob/master/bin/elasticsearch.in.bat? |
Related to this, does anyone know if JAVA_HOME is only required to start elasticsearch in the script or is it also used by some other internals? If it is the former then maybe we can add an optional parameter for the JAVA_HOME path. |
@garvincasimir AFAIK it is only necessary for start/stop scripts. |
@garvincasimir just to keep you informed: the pull request #9160 adds the --silent option. |
Awesome! Can't wait to incorporate this into my project! Thanks @tlrx |
On Windows platforms when JAVA_HOME is not defined, a message is printed on standard output and the bat script is paused until the user press a key. This behavior is not compliant to automated processes where elasticsearch.bat can be executed by another script. This commit adds a new parameter --silent / -s that allow to skip the pause. Also, the error message is directed to standard and error outputs. Closes elastic#8913
On Windows platforms when JAVA_HOME is not defined, a message is printed on standard output and the bat script is paused until the user press a key. This behavior is not compliant to automated processes where elasticsearch.bat can be executed by another script. This commit adds a new parameter --silent / -s that allow to skip the pause. Also, the error message is directed to standard and error outputs. Closes #8913 (cherry picked from commit 261eb5b)
On Windows platforms when JAVA_HOME is not defined, a message is printed on standard output and the bat script is paused until the user press a key. This behavior is not compliant to automated processes where elasticsearch.bat can be executed by another script. This commit adds a new parameter --silent / -s that allow to skip the pause. Also, the error message is directed to standard and error outputs. Closes #8913 (cherry picked from commit 261eb5b)
On Windows platforms when JAVA_HOME is not defined, a message is printed on standard output and the bat script is paused until the user press a key. This behavior is not compliant to automated processes where elasticsearch.bat can be executed by another script. This commit adds a new parameter --silent / -s that allow to skip the pause. Also, the error message is directed to standard and error outputs. Closes elastic#8913 (cherry picked from commit 261eb5b)
I am using Elasticsearch in a project which is intended to run it in Azure Worker roles. I run a series of configuration tasks to install java then configure elasticsearch and run it. The problem is when the batch script does not find JAVA_HOME it pauses instead of throwing an error and returning an exit code. Because of this I will assume that this batch script is geared towards people who intend to run elasticsearch manually. I propose a similar batch script elasticsearch-headless.bat which can be initiated by other automated processes.
I realize that there is a service.bat but I would lose too much control if I installed Elasticsearch as a service. The runtime needs to respond immediately if the process crashes for example.
The text was updated successfully, but these errors were encountered: