Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 637A9C52F for ; Thu, 11 Dec 2014 14:26:44 +0000 (UTC) Received: (qmail 46995 invoked by uid 500); 11 Dec 2014 14:26:39 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 46933 invoked by uid 500); 11 Dec 2014 14:26:39 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 46922 invoked by uid 99); 11 Dec 2014 14:26:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Dec 2014 14:26:39 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dmikusa@pivotal.io designates 209.85.212.171 as permitted sender) Received: from [209.85.212.171] (HELO mail-wi0-f171.google.com) (209.85.212.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Dec 2014 14:26:35 +0000 Received: by mail-wi0-f171.google.com with SMTP id bs8so14725749wib.16 for ; Thu, 11 Dec 2014 06:24:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=wOxpczj5lTiEils+N+D41JMLCD4Bd/PwEyj3FD96MMY=; b=cIMX9Z/kD4J0i6TVWPJgURAgkWOiB8OXSQCjj9K5SbrGUhFynLx/jZhDPrmrohvnRX 9kDIcoKmFyMg6Ai3FkBclutoqn7lJd0duR7fYhxTwVHii43icIHrPd2Q5i3SjamJGofE +YVHFcK65O3dsMGBYCAt4sXasZcqc1S5HYuWujOyn7Q4uWxk5gTiMlToCwvxOR5ekRyh 9f9ZGC1iBkEhuBOfAwSBYTTcjvuanT8pANEQy/nkC+fEY+2oUXZRIfH7A6d2sd+kb0jo Pf9pFsdLn1x9Jpf9qSHYz9w86VSVyUTLNOy46Rswyd3WrEHClEZUjUIt4XzRbEb3+9Zv RSQQ== X-Gm-Message-State: ALoCoQlCvGX38ENcMG+eWVQZC5Vr7hSmFKJJa+L+pn5+qkN0k3plJxYtaaufe9KlkrNA+nLpn0Fa MIME-Version: 1.0 X-Received: by 10.180.76.7 with SMTP id g7mr23894024wiw.38.1418307884436; Thu, 11 Dec 2014 06:24:44 -0800 (PST) Received: by 10.217.12.205 with HTTP; Thu, 11 Dec 2014 06:24:44 -0800 (PST) In-Reply-To: References: <54886656.2060609@christopherschultz.net> Date: Thu, 11 Dec 2014 09:24:44 -0500 Message-ID: Subject: Re: Multiple instances? From: Daniel Mikusa To: Tomcat Users List Content-Type: multipart/alternative; boundary=f46d043893c7a291850509f1899d X-Virus-Checked: Checked by ClamAV on apache.org --f46d043893c7a291850509f1899d Content-Type: text/plain; charset=UTF-8 On Thu, Dec 11, 2014 at 3:45 AM, Billy Bones 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 : > > > On Wed, Dec 10, 2014 at 10:35 AM, Billy Bones > > 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 > > > > > > > > > > > > > > --f46d043893c7a291850509f1899d--