You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Beutel, Stephan" <sb...@informatica.com> on 2013/09/19 12:25:22 UTC

Tomcat7.0.42 shutdown problems

Hello,

I want to stop installed Windows service in command line using 'Tomcat7.exe stop SERVICENAME'.
With Tomcat 7.0.35 it works well. With 7.0.42 I always get an error code 6 and the service isn't stopped.

Here's the log output from commons-daemon.log:

[2013-09-19 01:32:40] [info] [ 3816] Commons Daemon procrun (1.0.15.0 64-bit) started
[2013-09-19 01:32:40] [info] [ 3816] Stopping service 'SERVICENAME' ...
[2013-09-19 01:32:44] [error] [ 3816] Failed to stop 'SERVICENAME' service
[2013-09-19 01:32:44] [error] [ 3816] The data area passed to a system call is too small.
[2013-09-19 01:32:44] [info] [ 3816] Stop service finished.
[2013-09-19 01:32:44] [error] [ 3816] Commons Daemon procrun failed with exit value: 6 (Failed to stop service)
[2013-09-19 01:32:44] [error] [ 3816] The data area passed to a system call is too small.

I have to stop the service because I do an automatic installation of my application with Jenkins and an ANT script.
The ANT script stops the service, downloads the artifacts from my Jenkins build, unpack and copy artifacts to the
Tomcat folder and then starts the service again. It would be very helpful if I can get this issue fixed.

Thanks for any answer.
Stephan

Re: Tomcat7.0.42 shutdown problems

Posted by Konstantin Kolinko <kn...@gmail.com>.
2013/9/19 Beutel, Stephan <sb...@informatica.com>:
> Hello,
>
> I want to stop installed Windows service in command line using 'Tomcat7.exe stop SERVICENAME'.
> With Tomcat 7.0.35 it works well. With 7.0.42 I always get an error code 6 and the service isn't stopped.
>
> Here's the log output from commons-daemon.log:
>
> [2013-09-19 01:32:40] [info] [ 3816] Commons Daemon procrun (1.0.15.0 64-bit) started
> [2013-09-19 01:32:40] [info] [ 3816] Stopping service 'SERVICENAME' ...
> [2013-09-19 01:32:44] [error] [ 3816] Failed to stop 'SERVICENAME' service
> [2013-09-19 01:32:44] [error] [ 3816] The data area passed to a system call is too small.
> [2013-09-19 01:32:44] [info] [ 3816] Stop service finished.
> [2013-09-19 01:32:44] [error] [ 3816] Commons Daemon procrun failed with exit value: 6 (Failed to stop service)
> [2013-09-19 01:32:44] [error] [ 3816] The data area passed to a system call is too small.
>
> I have to stop the service because I do an automatic installation of my application with Jenkins and an ANT script.
> The ANT script stops the service, downloads the artifacts from my Jenkins build, unpack and copy artifacts to the
> Tomcat folder and then starts the service again. It would be very helpful if I can get this issue fixed.
>

Tomcat7.exe and Tomcat7w.exe are just renamed prunsrv.exe and
prunmgr.exe from Apache Commons Daemon.

You should contact that project, see
http://commons.apache.org/proper/commons-daemon/
https://issues.apache.org/jira/browse/DAEMON-282

As your logs show, you are using version 1.0.15 of theirs. Whenever a
better version is released, Tomcat can be updated to pick it up.

What may be important is that both you and original reporter of issue
282 are using 64-bit version of service wrapper.

Note, that
1. You can use system command "net stop <servicename>" to stop a
service. I wonder whether that works for you.

2. Tomcat can be stopped by connecting to shutdown port at localhost
and typing shutdown command (configured on <Server> element in
server.xml) there.
That is what happens when you run "catalina.bat stop" or "shutdown.bat".  See
http://tomcat.apache.org/tomcat-7.0-doc/config/server.html

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org