kirillkovalenko / nssm

Non-Sucking Service Manager
https://nssm.cc
765 stars 127 forks source link

NSSM does not properly kill service #10

Closed kshshe closed 7 years ago

kshshe commented 7 years ago

Service is java jar file (RESTHeart server). When Windows tries to stop/restart service, RESTHeart is stops, but Windows continue "stopping" infinitely.

bkmdev commented 5 years ago

Hi, How did you resolve this? I am experiencing the same issue but with Janusgraph. The service "Path" is set to point to ...\bin\gremlin-server.bat (which in turn spawns off the Java process).

When stopping the service one gets an:

Error 1053: The service did not respond to the start or control request in a timely fashion

... with the state stuck in the "Stopping" (STOP_PENDING) state.

There are no errors in the event log. Checking the process list, one sees that all but NSSM.EXE is left running.
If I manually kill that, the Service manager properly shows that the service has "stopped" but shouldn't this be automatic?

Thanks!

kirillkovalenko commented 5 years ago

THIS REPO IS NOT OWNED OR MONITORED BY THE AUTHOR OF THIS APPLICATION! REACH OUT TO HIM AT me@iain.cx

bkmdev commented 5 years ago

@kirillkovalenko thanks, I'm aware of that, as you have pasted that on every issue here 😃 The question was directed to the OP (@kshshe). If I don't receive a response I may try reaching out to the author.

PS: FWIW, I've also since tried YAJSW which is a bit more complex but seems to work, has similar functionality and a more active user base, so may end up using that instead.

moqmar commented 3 months ago

For other people stumbling across this issue (like myself): Disabling "Kill Process Tree" under "Shutdown" (nssm set MyService AppKillProcessTree 0 does the trick for me.