tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Mikusa <dmik...@pivotal.io>
Subject Re: Multiple instances?
Date Thu, 11 Dec 2014 14:24:44 GMT
On Thu, Dec 11, 2014 at 3:45 AM, Billy Bones <gael.therond@gmail.com> wrote:

> Ok, then I'll completly wright another systemd unit derivated from the one
> provided by CentOS.
>
> Yup, that what I thought about the CATALINA_HOME and BASE, so as you
> suggested, I'll test to run individual units and saw how it's going on.
>
> Many thanks guys.
>

When you get something working, please share your solution :)

I'm interested to see what you work out and I'm sure others will be as well.

Dan



>
> 2014-12-10 18:10 GMT+01:00 Daniel Mikusa <dmikusa@pivotal.io>:
>
> > On Wed, Dec 10, 2014 at 10:35 AM, Billy Bones <gael.therond@gmail.com>
> > wrote:
> >
> > > Hi Christopher,
> > >
> > > Many thanks for your answer, well, I'm pretty comfortable with systemd
> > > myself as I rely on it for my Fedora box for a long time ago, but on
> this
> > > particular topic regarding tomcat, I don't really understand the
> purpose
> > of
> > > this special sentence.
> > > As you pointed it, for me too usually caps names == env variables but
> as
> > on
> > > the tomcat-sysd script it's simply called without futher sources I'm
> not
> > > quite sure for now.
> > >
> > > Well, lets see if another *NIX Admin already had started
> multi-instances
> > > tomcat on systemd distributions :D
> > >
> >
> > Starting different instances of Tomcat is mostly just a matter of setting
> > the CATALINA_HOME and CATALINA_BASE environment variables to the right
> > locations.  I'm sure systemd has a way for you to set environment
> > variables, so that should be sufficient to start different instances.
> >
> > For more details on CATALINA_HOME and CATALINA_BASE, check out the
> > RUNNING.txt file in your download or look here.
> >
> >
> >
> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/RUNNING.txt?view=markup
> >
> > I'd suggest getting everything working with multiple instance first.
> Once
> > you can start the instances from the command line then worry about
> starting
> > them with systemd.
> >
> >
> > >
> > > Another way would be to completly duplicate the tomcat directory and
> > > service unit and start both at runtime but... doesn't seems too shiny
> > for a
> > > new server :D
> > >
> >
> > Also an option, but not as efficient.
> >
> > Dan
> >
> >
> > >
> > > 2014-12-10 16:27 GMT+01:00 Christopher Schultz <
> > > chris@christopherschultz.net
> > > >:
> > >
> > > > -----BEGIN PGP SIGNED MESSAGE-----
> > > > Hash: SHA256
> > > >
> > > > Billy,
> > > >
> > > > On 12/10/14 9:57 AM, Billy Bones wrote:
> > > > > Hi guys,
> > > > >
> > > > > I'm currently preparing a migration of our Operating System which
> > > > > handle our current tomcat installation from an OLD Linux using init
> > > > > scripts to a CentOS7 release using sytemd.
> > > >
> > > > Hrm. Good luck getting help with systemd. The ASF doesn't even
> support
> > > > init.d scripts, though I'm sure many *NIX admins here can help with
> > > > init.d scripts (including myself). systemd is a bit new, to ... we'll
> > > see.
> > > >
> > > > > Because I don't want to disturb the way the old server handle the
> > > > > webapps (not yet :-) ), I have to start 2 separated instances of
> > > > > tomcat on the new machine.
> > > > >
> > > > > Using init script to boot multiples instance is quite easy, but
> > > > > know I'll use systemd and I have to adapt.
> > > > >
> > > > > I installed my OS and Tomcat from the CentOS repos, take a look at
> > > > > the tomcat.service unit and tomcat-sysd script to see how the
> > > > > things work. But now I'm a little bit disappointed, I don't
> > > > > understand how to have multiple instances.
> > > > >
> > > > > I created a tomcat@jcr.service unit file on my systemd directory
> > > > > and read about the steps to achieve.
> > > > >
> > > > > The first step said that *"by default SERVICE_NAME=tomcat. and must
> > > > > be defined BEFORE tomcat-sysd is called"*
> > > > >
> > > > > Well, OK, but how am I suppose to do that? Using environnement
> > > > > variables? PreStartExec directive? Environnement directive?
> > > >
> > > > I have no idea. Generally, whenever I see something in ALL_CAPS that
> > > > needs to be set to a value, it's an environment variable. With
> > > > systemd, it could mean just about anything.
> > > >
> > > > > I really don't get it, even looking at the tomcat-sysd wrapper
> > > > > script which indicate me HOW the system run multiple instance don't
> > > > > help me to understand WHERE am I suppose to put that information.
> > > > >
> > > > > I understand that I have to create a new unit file, a new
> > > > > /etc/sysconfig/tomcat file named according to the systemd unit, but
> > > > > I don't get it about the SERVICE_NAME.
> > > > >
> > > > > So if someone could help me a little bit, I'll be happy ^^
> > > >
> > > > Ultimately, it will all boil down to CATALINA_BASE and CATALINA_HOME
> > > > as far as Tomcat is concerned. The SERVICE_NAME is probably a
> > > > systemd-only thing.
> > > >
> > > > Good luck,
> > > > - -chris
> > > > -----BEGIN PGP SIGNATURE-----
> > > > Version: GnuPG v1
> > > > Comment: GPGTools - http://gpgtools.org
> > > >
> > > > iQIcBAEBCAAGBQJUiGZWAAoJEBzwKT+lPKRYsI0QAMI0IOCB2PjgBFKKb7Q1KtfF
> > > > EpplWZmWEg7FL20HzTTjWM41r0IX5jZv1zFVBI8Na2mjtQ0v1KUUzPWnWo2+mGus
> > > > nyrHl7HcY80LL9t4v3XwIpY0wE5pNgmTtnH+6JdHsahNNTN6NceK/j1IJoUPUFBj
> > > > 9tdWHCM+bM6rP49nYBvBV3XPClw7nEc+NO3ddMeAY+zli71TuTnwIyC3Dp1v6ONW
> > > > iNxheXHfDGACU1Qo7t9xL33g8cng06RD+LOjV/0d7JX3YJh5okoLL2m6ACHrQI7c
> > > > knlon9yX0skzLhesZnkPeePli7Atk0s54SdH71MZe41ZJvlb/DAYmIqlkg1H7CGA
> > > > fJlWmCfU0RwwNDdNq9prfQt/LFePnKQJ6PNO75afkfROKqnklYBe4imqpGqg1ij1
> > > > vRMyemYobM83m2/xpZ3l5FWwk+DoJiWBC9MdAJ/M6TYXU8y3ERPtyzEfVfsTRnzu
> > > > Q6XQ5wcJzJmazA3SK4h743auSbNLp9iVrAH5Rhh5iAxCZTtf5Et1zgBfocpTh12X
> > > > xmgnsJtLTZ3jKNxdx9wD8zsXK0JYtWCYwisXRj6fGQuUU7INLDqRL7dVdl8VrHRQ
> > > > ra4UXRhg8cKLd8YFbd78UxJK66TP/EyQqv1cIwTGF+XSS87pvAnR1T36cQ4e5KIB
> > > > xwylVvlwSd9BvhatJtJw
> > > > =w7Y2
> > > > -----END PGP SIGNATURE-----
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > > For additional commands, e-mail: users-help@tomcat.apache.org
> > > >
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message