> -----Original Message----- > From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Sent: Monday, June 15, 2015 10:02 AM > To: Tomcat Users List > Subject: Re: Shutdown port and multiple Tomcat instances > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Jeffrey, > > On 6/15/15 10:49 AM, Jeffrey Janner wrote: > > I’m making the switch to running all my tomcats on Linux. > > > > I’m planning to deploy multiple instances per machine, splitting > > catalina_base and catalina_home, and just have question on the > > shutdown port. > > > > Under Windows, I just deployed the binary with the commons daemon > > wrapper and set the shutdown port to -1 and let the daemon manage > > the orderly shutdown. > > > > Is it possible to set the port to -1 under Linux and do something > > similar? Preferably without deploying the daemon wrapper also, > > though I’m willing to do if necessary. I am planning to manage > > them with service/init scripts for startup and shutdown. > > The *NIX analog to the Windows Service runner /is/ jsvc. > > I'm curious why you don't want to run jsvc. > > If you don't want to run jsvc, why not pick a unique shutdown port > number and use the standard scripts? > > We run multiple JVMs on a single machine, and we even (in dev) have > multiple users with multiple JVMs, etc. *and* we are using mod_jk to > connect them all, so we have to manage ports carefully. > > We have come up with this method to organize everything: > > 1. Each user has a "user number" -- let's call that "u" > 2. Each application has an "app number" -- let's call that "a" > > Port numbers now look like this: > > 8ua5 - ajp port for the application > 8ua6 - shutdown port for the application > 8ua7 - secure port for loopback requests from other apps > (if necessary for the application) > > We have scripts that use these things so a user just has to set up > their "u" and "a" values properly and everything works. It's also > possible to predict who will be using what port, and - ignoring typos > - - nobody has any conflicts. > > - -chris
Thanks for the tips Chris. That could really come in useful. I'm not adverse to running jsvc, I'm just under a current time crunch and have something like 50 of these to turn out in short order. I didn't want to have to mess with getting another layer to work right now. Jeff