Windows service shutdown issues

10 views
Skip to first unread message

Ron Michael Zettlemoyer

unread,
Mar 8, 2014, 7:03:21 PM3/8/14
to sta...@clarkparsia.com
I'm having issues where Stardog doesn't get shutdown properly when a system shutdown occurs. I actually posted something like this a week or so ago but deleted it when I remembered that I needed to embed the admin password into stop-service.bat (or in the stardog server properties applet). I've done that but am still having issues.

When using the command line or Services program to stop or restart the service it works fine. But last night Microsoft (gracefully and with warning) rebooted a bunch of Azure instances and Stardog didn't stop properly. In Stardog's own logs I can see it got the shutdown notice and it started to shutdown but there's no log of a successful shutdown for Stardog in the system event log (which there usually is from Service Control Manager).  And upon reboot the system.lock file was still in place so it couldn't start.

I remember long ago I ran into something like this and the culprit was that Stardog was taking too long to shutdown - something to do with Java and temp files. But I can't be sure if that's happening. The server had been up since 2/24/2014 but with very little write activity to it. I'm using Java 1.7.0 on Windows Server 2012 R2.

I know you're using the Apache Commons procrun thing as a wrapper around Stardog. It looks like the installer sets the StopTimeout to 0. Could that be an issue? The procrun docs say that a blank timeout means there is no timeout but I'm not sure if 0 is the same thing. (and when the timeout is reached, does procrun just kill the process?)  I can obviously change it and see what happens but I thought I'd ask in case someone already knows.

I also noticed that you initiate the startup by calling a Java function but initiate the shutdown with a batch file. Is there a reason you can't shut it down with another Java call? I'm just curious if that would be more reliable. I did try changing the settings to see if I could get this to work but I couldn't... and I didn't want to futz with it too much as you may have good reason for using the batch file.

Thanks!
Ron

Mike Grove

unread,
Mar 13, 2014, 8:19:14 AM3/13/14
to stardog
Ron,

Thanks for mentioning this.  We will take a look at it an see if we can notice anything.

Cheers,

Mike


--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Stephen Nowell

unread,
Mar 14, 2014, 2:24:48 PM3/14/14
to sta...@clarkparsia.com
Hi Ron,

I am unable to reproduce this issue on our Windows 7 test machine, also
running Java 1.7.0, with Stardog 2.1.2. After the system rebooted, the
service was no longer running, nor was the system.lock file in
STARDOG_HOME. Your hunch regarding the temp files may be correct here,
as that was a bug that we fixed for 2.1.2. If you encounter this problem
again with 2.1.2 please let us know and we can investigate further.

Thanks!
-Stephen

Ron Michael Zettlemoyer

unread,
Mar 14, 2014, 2:34:59 PM3/14/14
to Stardog
Thanks for checking, Stephen. I'll upgrade and then keep an eye on it. 


--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
Reply all
Reply to author
Forward
0 new messages