RE: multiple instances of tomcat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






From: edwardquick@xxxxxxxxxxx
To: users@xxxxxxxxxxxxxxxxxxxxxxx
Subject: multiple instances of tomcat
Date: Sat, 23 May 2015 14:49:15 +0000

Hi,

First just to say I'm running F21.

I found a post on setting up multiple tomcat instances at https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20130708/1055381.html which states:

    In the new world, if you need an instance, you'll create a directory
    /var/lib/tomcats/name, create {conf temp work webapps} in it, and then
    systemctl enable tomcat at name.service.

So I created  /var/lib/tomcats/instance1, /var/lib/tomcats/instance2 and /var/lib/tomcats/instance3 (and their contents)

I then ran:

[root@laptop system]# systemctl enable tomcat@instance1.service
Created symlink from /etc/systemd/system/multi-user.target.wants
/tomcat@instance1.service to /usr/lib/systemd/system/tomcat@.service.

[root@laptop system]# systemctl enable tomcat@instance2.service
Created symlink from /etc/systemd/system/multi-user.target.wants
/tomcat@instance2.service to /usr/lib/systemd/system/tomcat@.service.

[root@laptop system]# systemctl enable tomcat@instance3.service
Created symlink from /etc/systemd/system/multi-user.target.wants/tomcat@instance3.service to /usr/lib/systemd/system/tomcat@.service.

And created these sysconfig files, changing the CATALINA_BASE to match the corresponding directory under /var/lib/tomcats:

[root@laptop system]# ls -l /etc/sysconfig/*tomcat*
-rw-rw-r--. 1 root tomcat  490 Feb 14 21:29 /etc/sysconfig/tomcat
-rw-r--r--. 1 root root    194 May 23 14:58 /etc/sysconfig/tomcat@instance1
-rw-r--r--. 1 root root    194 May 23 14:59 /etc/sysconfig/tomcat@instance2
-rw-r--r--. 1 root root    194 May 23 15:00 /etc/sysconfig/tomcat@instance3


Unfortunately everytime I try to start one of these instances, for example, if I run

systemctl  start tomcat@instance2

it just starts up the system installed tomcat with CATALINA_BASE /usr/share/tomcat.

Please could you tell me if I am doing anything obviously wrong here? :)

Thanks for any help.

Edward


P.S. Just a note to add that I did get this working but only after adding the following files. The discussion in the attached link seemed to indicate that I shouldn't need to do this.

[root@laptop logs]# cat /etc/sysconfig/tomcat@instance1
TOMCAT_CFG_LOADED=1
CATALINA_HOME="/usr/share/tomcat"
CATALINA_BASE="/var/lib/tomcats/instance1"
CATALINA_TMPDIR="/var/lib/tomcats/instance1/temp"
TOMCAT_USER="tomcat"
CATALINA_PID="/var/lib/tomcats/instance1/logs/tomcat.pid"


[root@laptop logs]# cat /etc/sysconfig/tomcat@instance2
TOMCAT_CFG_LOADED=1
CATALINA_HOME="/usr/share/tomcat"
CATALINA_BASE="/var/lib/tomcats/instance2"
CATALINA_TMPDIR="/var/lib/tomcats/instance2/temp"
TOMCAT_USER="tomcat"
CATALINA_PID="/var/lib/tomcats/instance2/logs/tomcat.pid"


[root@laptop logs]# cat /etc/sysconfig/tomcat@instance3
TOMCAT_CFG_LOADED=1
CATALINA_HOME="/usr/share/tomcat"
CATALINA_BASE="/var/lib/tomcats/instance3"
CATALINA_TMPDIR="/var/lib/tomcats/instance3/temp"
TOMCAT_USER="tomcat"
CATALINA_PID="/var/lib/tomcats/instance3/logs/tomcat.pid"


-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux