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
windows as service does not work #13247
Comments
I think this functionality is also untested. |
@gmarz would you be able to take a look at this? |
I get the same thing as well:
I'll start digging... |
Very much. I was looking at getting vagrant tests for this too but it'd be very different than the existing bats tests. And I'm not sure what the licenses are for running windows VMs for testing. If someone can point me to something that makes it clear that window's license lets people spin up VMs for testing then I'll dig more into it and try to use the same technique we use for linux. Without bash, I guess. |
I found that changes in elasticsarch.in.bat related to ES_GC_OPTS environment variables caused JAVA_OPTS environment variable to contain " " two consecutive spaces. These are converted by service.bat into ";;" two consecutive semicolons. This causes procrun to stop adding Java options to service and service start fails with:
However even after manipulating ES_GC_OPTS / JAVA_OPTS to not contain two consecutive spaces (and procrun taking all Java options), service start still fails with
I found that this can be fixed by adding "--StartParams start" to service.bat line 162 (starts with "%EXECUTABLE%" //IS//%SERVICE_ID%) Now stopping fails with
|
@jochen-st yea, that's one of the issues with the script. The other, which you're running into now has to do with the fact that the new elasticsearch CLI now requires a start argument, which the service doesn't pass. I'm working on a fix and will open a PR shortly. |
@jochen-st sorry, just realized I misread your comment and that you already discovered that the script doesn't pass the The stopping issue is a bit more involved. Apache Commons Daemon requires a static stop method (--StopMethod) in order to shutdown gracefully. This use to exist ( Not sure the reasoning for removing it and how it should be added back. I'm going to open a new issue for this. |
This commit addresses several bugs that prevented the Windows service from being started or stopped: - Extra white space in the concatenation of java options in elasticsearch.in.bat which tripped up Apache Commons Daemon and caused ES to startup without any params, eventually leading to the "path.home is not configured" exception. - service.bat was not passing the start argument to ES - The service could not be stopped gracefully via the stop command because there wasn't a method for procrun to call. Closes elastic#13247 Closes elastic#13401
This commit addresses several bugs that prevented the Windows service from being started or stopped: - Extra white space in the concatenation of java options in elasticsearch.in.bat which tripped up Apache Commons Daemon and caused ES to startup without any params, eventually leading to the "path.home is not configured" exception. - service.bat was not passing the start argument to ES - The service could not be stopped gracefully via the stop command because there wasn't a method for procrun to call. Closes #13247 Closes #13401
This commit addresses several bugs that prevented the Windows service from being started or stopped: - Extra white space in the concatenation of java options in elasticsearch.in.bat which tripped up Apache Commons Daemon and caused ES to startup without any params, eventually leading to the "path.home is not configured" exception. - service.bat was not passing the start argument to ES - The service could not be stopped gracefully via the stop command because there wasn't a method for procrun to call. Closes #13247 Closes #13401
Trying to follow https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-service-win.html doesn't work with master.
I get this error "The data area passed to a system call is too small"
The text was updated successfully, but these errors were encountered: