2011/3/26 Steven Schlansker <ste...@trumpet.io>:
> Hi everyone,
> I'm running Tomcat 6.0.32 on Linux and am encountering a pretty confusing 
> mismatch between documentation and reality.  Hoping you can verify that this 
> is a problem or point out where I'm doing things wrong.
>
> We are running multiple tomcats on the same server (to provide additional 
> levels of isolation between different webapps) but the shutdown port is 
> inconvenient to manage when you are dealing with flexible deploys.  In 
> particular the different tomcats will attempt to bind to the same loopback 
> port, causing problems.
>
> The documentation states:
>
> port
>
> The TCP/IP port number on which this server waits for a shutdown command. 
> This connection must be initiated from the same server computer that is 
> running this instance of Tomcat. Set to -1 to disable the shutdown port. 
> Note: Disabling the shutdown port will prevent shutdown.bat and catalina.bat 
> from stopping the Tomcat process on Windows operating systems. Operating 
> systems that use the *.sh scripts will not be affected by disabling the 
> shutdown port.
>
>
> However, the shell scripts do not appear to actually shut down the Tomcat 
> correctly.  They invoke Bootstrap stop, which gives up thusly:
> (...)
> The end result is that shutdown.sh hangs for the "timeout" period and then 
> sends a kill -9 to the tomcat.  Not the most graceful shutdown!


kill -9 is sent only of you add "-force" to the shutdown command. It
does not do so by default.

> I would expect that the script would attempt to send a kill -TERM to tomcat 
> if Bootstrap shutdown fails, but it does not appear to do that.


The script does not know why shutdown fails.  It does not read
server.xml to note this configuration, nor it parses the log messages
(which might be i18n'ed).

It might be a bad idea to use System.exit() in Bootstrap to explicitly
return a non-zero result code, because "Bootstrap stop" might be
called from jsvc or in another embedded scenarios and thus it should
not forcibly terminate the JVM.


If you have ideas/patch on how it can be implemented, please file an
enhancement request.

You are right that the documentation was incorrect there. I updated it,
http://svn.apache.org/viewvc?rev=1086036&view=rev


Best regards,
Konstantin Kolinko

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

Reply via email to