[ClusterLabs] Adding Tomcat as a resource to a Cluster on CentOS 7
Sean Beeson
seanbeeson at gmail.com
Thu Nov 30 08:26:34 EST 2017
Hi, list.
This is a pretty basic question. I have gone through what I could find on
setting up Tomcat service as a resource to a cluster, but did not find
exactly the issue I am having. Sorry, if it has been covered before.
I am attempting this on centos-release-7-4.1708.el7.centos.x86_64.
The pcs I have installed is pcs-0.9.158-6.el7.centos.x86_64
The resource-agents installed is resource-agents-3.9.5-105.el7_4.2.x86_64
I have DRBD, MySql, and a virtual IP running spectacularly well and they
failover perfectly and do exactly what I want them. I can add Tomcat as a
resource just fine, but it never starts and I can not fined anything in any
log file that indicates why. Pcs does at some point know to check on it,
but simply says Tomcat is not running. If I run everything manually on in a
cluster I can manually get Tomcat to start with systemctl. Here is how I am
try to configure it.
[root at centos7-ha-lab-01 ~]# pcs status
Cluster name: ha-cluster
Stack: corosync
Current DC: centos7-ha-lab-02-cr (version 1.1.16-12.el7_4.4-94ff4df) -
partition with quorum
Last updated: Thu Nov 30 21:03:36 2017
Last change: Thu Nov 30 20:53:37 2017 by root via cibadmin on
centos7-ha-lab-01-cr
2 nodes configured
6 resources configured
Online: [ centos7-ha-lab-01-cr centos7-ha-lab-02-cr ]
Full list of resources:
Master/Slave Set: DRBD_data_clone [DRBD_data]
Masters: [ centos7-ha-lab-01-cr ]
Slaves: [ centos7-ha-lab-02-cr ]
fsDRBD_data (ocf::heartbeat:Filesystem): Started centos7-ha-lab-01-cr
OuterDB_Service (systemd:mysqld): Started centos7-ha-lab-01-cr
OuterDB_VIP (ocf::heartbeat:IPaddr2): Started centos7-ha-lab-01-cr
tomcat_OuterWeb (ocf::heartbeat:tomcat): Stopped
Failed Actions:
* tomcat_OuterWeb_start_0 on centos7-ha-lab-01-cr 'unknown error' (1):
call=67, status=Timed Out, exitreason='none',
last-rc-change='Thu Nov 30 20:56:22 2017', queued=0ms, exec=180003ms
* tomcat_OuterWeb_start_0 on centos7-ha-lab-02-cr 'unknown error' (1):
call=57, status=Timed Out, exitreason='none',
last-rc-change='Thu Nov 30 20:53:23 2017', queued=0ms, exec=180003ms
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled
I have tried with and without tomcat_name=tomcat_OuterWeb and tomcat and
root for tomcat_user=. Neither work.
Here is the command I am using to add it.
pcs resource create tomcat_OuterWeb ocf:heartbeat:tomcat
java_home="/opt/java/jre1.7.0_80" catalina_home="/opt/tomcat7"
catalina_opts="-Dbuild.compiler.emacs=true -Dfile.encoding=UTF-8
-Djava.util.logging.config.file=/opt/tomcat7/conf/log4j.properties
-Dlog4j.configuration=file:/opt/tomcat7/conf/log4j.properties -Xms1024m
-Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m" tomcat_user="root" op
monitor interval="15s" op start timeout="180s"
I have tried also the most basic.
pcs resource create tomcat_OuterWeb ocf:heartbeat:tomcat
java_home="/opt/java/jre1.7.0_80" catalina_home="/opt/tomcat7"
tomcat_name="tomcat_OuterWeb" tomcat_user="root" op monitor interval="15s"
op start timeout="180s"
I other examples I have seen they usually use params then the options in
these command to add Tomcat as a resource, but when I use that it tells me
that is an unrecognized option and it then accepts the options without it
just fine. I was led to think this was a difference in version of the
resource-agents perhaps.
Any idea why I can not get Tomcat to start or some lead to the logging I
could look at to understand why it is failing would be great. Nothing shows
in messages, catalina.out, pcsd.log, nor the resource
log--tomcat_OuterWeb.log. However, it does make the resource log, but it
only has this in it, which seems to be false:
2017/11/30 20:50:22: start ===========================
2017/11/30 20:53:22: stop ###########################
2017/11/30 20:56:22: start ===========================
2017/11/30 20:59:22: stop ###########################
The only other thing is: * tomcat_OuterWeb_start_0 on centos7-ha-lab-01-cr
'unknown error' (1): call=67, status=Timed Out, exitreason='none',
Again, any ideas would be appreciated. Thank you.
Kind regards,
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clusterlabs.org/pipermail/users/attachments/20171130/189ae3c7/attachment-0002.html>
More information about the Users
mailing list