Ah, I think I found out some more helpful diagnostics using Process Explorer and File Monitor: Seems like shutdown.cmd is not run directly when stopping the service. Instead, "service.bat stop" is being called, which, in turn, calls shutdown.bat -S.
So, by changing service.bat (near the cmdStop label), I am able to control the params passed to shutdown.bat :-)
thanks, problem solved.
What is the change you have made in service.bat file (near the cmdStop label)? I am having the same issue. Thank you in advance...
like I said, IF the cause of the problem is a non-default RMI port (anything different than 1099), then edit service.bat, so that instead of the line:
shutdown.bat ...
write:
shutdown.bat -s localhost:your_rmi_port -S
that's it :-)
pls let me know if it helped...
note there should be no space between localhost: and port - it's the web gui that added it for some reason :^(
My experience with Windows Server 2003 suggests that the run.log file is being locked by the service and/or the operating system. Later attempts that try to write to the log fail immediately.
I had varied success with starting/stopping until I figured this out. At that point, I simply edited the services.bat to eliminate any output to run.log and shutdown.log.
I figured there was enough logging by JBoss itself. If I want to debug the service, I can run it manually using "service.bat start" (which is how I found out that the log file was locked in the first place).