tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Kartashov <>
Subject Re: Tomcat 3.2.2 beta 4 (problem with shutdown code)
Date Fri, 04 May 2001 14:43:22 GMT

On Fri, May 04, 2001 at 09:26:35AM +0200, GOMEZ Henri wrote:
> >Hi, all!
> >I've made a little modification in Tomcat 3.2.1 codebase that 
> >I think would
> >be nice to include in TC 3.2.2.
> >
> >Problem: shutdown script always connects to "localhost" to 
> >send shutdown command.
> >It is a problem on a "multihomed" machine running multiple 
> >tomcats where
> >tomcats use same port numbers but bound to different IP 
> >adresses using inet=""
> >configuration option in server.xml.
> Hey do you really want someone outside you machine send a shutdown
> command to your tomcats ? 
I think it is very common configuration where Ajp connector is 
bound to something other than "".
Here are couple of examples: It is possible and some times desired to have
Apache web server load balance tomcat servers that run on physically different
machines; It is possible and some times useful to run mutiple Tomcat
instances on the same box that has multiple IP's (this may be good for

> Warning, Warning here. The "localhost" is used here for security
I strongly disagree with this:) If you configure your Ajp connector to listen
to a particular interface someone _CAN_ send you shutdown command regardless
of your shutdown code abilities.

If you want security - you need to think about your network configuration,
not the shutdown code. This is what sys admins are for:)
A good example would be a machine that has multiple interfaces with
non-routable addresses (a developement machine) Or load balanced machines
behind the firewall.

I don't mean to enumerate all the possibilities here - this is just a few

> reasons. I didn't understand why your multihomed machine couldn't
> listen on localhost ?
> Thanks to give us more informations, for example did you use multiples
> JVMs ?

Our configuration:
We have a developement machine with multiple interfaces running multiple
instances of Tomcat. It is behind the firewall. These different interfaces
have different internal DNS names and you can't hit them from outside:)

There are 2 ways to set up Tomcat here:
	1) All Ajp connectors bound to the same but on different ports.
	2) Ports are the same but Ajp connectors are bound to different IP's

We prefer second case. Why? - It's a matter of taste&style.
The problem is that in this case shutdown code misbehaves as you may guess:)
Solution to this is very simple and I had it attached to previous E-Mail.

oo Andrey
"All mail clients suck. This one just sucks less."
           --  Jeremy Blosser

View raw message