3

When using Apache commons daemon - procrun to run Java apps on Windows XP 32 bit platform, how to gracefully stop service?

I have read procrun documentation and set time out 120 seconds while registering service. This is not working as intended. Windows shuts down without waiting for the said time period.

While searching on internet found that Windows service has a structure and this is included in procrun.

Now the question is how to make a service accept shutdown using procrun?

FYI: Service stopping using any of the below three ways is graceful

  1. net stop service-name
  2. service-name.exe stop
  3. services.msc
Hsehdar
  • 103
  • 12
  • 3
    do you want the service to shutdown on windows shutdown? or do you want to shutdown the service from the services.msc? – ams Nov 27 '12 at 06:07
  • Service needs to be gracefully stopped by Windows shutdown. For example W32Time (Windows Time). – Hsehdar Nov 27 '12 at 06:18
  • Since the Windows XP 32 bit was running in XP mode on Windows 7 this issue came up. Whereas Windows XP 32 bit on Oracle VM VirtualBox shuts down the service gracefully. This question is unanswered because services registered using procrun need to have ACCEPTS_SHUTDOWN. Not sure how to do it. – Hsehdar Nov 28 '12 at 06:09
  • ASF accepts this as bug and [issue](https://issues.apache.org/jira/browse/DAEMON-274) is assigned. – Hsehdar Jan 04 '13 at 03:42

1 Answers1

3

This is a bug in procrun 1.0.10 and may get a fix shortly. Kindly monitor the issue for more information

Update: Jan 22, 2013 The bug got resolved. Changes are queued in release train. Waiting for votes in ASF. Once voted (hopefully in few days) it'll be available for GA.

Update: Jan 25, 2013 The ASF commons daemon release 1.0.12 resolves this bug. Kindly download the latest release.

Hsehdar
  • 103
  • 12
  • I'm experiencing a similar issue. Windows reliability monitor is still reporting the service as Stopped Working although the appears to shutdown properly. Any advice? – Floresj4 Dec 20 '18 at 17:29