<div dir="ltr">Hi, <br><br>I just wanted to add the solution for future reference. <br><br>On CentOS 7 PCS starts and stops Tomcat as a systemd service named tomcat@tomcat.service, so a Unit file for the service in /etc/systemd/system/ is needed. The simplest way to create that Unit file is to do this on both the primary and secondary-- cp /etc/systemd/system/tomcat.service /etc/systemd/system/tomcat@tomcat.service. <br><br>Kind regards,<br><br>Sean<br><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 7, 2017 at 3:47 AM Sean Beeson <<a href="mailto:seanbeeson@gmail.com" target="_blank">seanbeeson@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, <span style="color:rgb(33,33,33);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;white-space:nowrap">Oyvind.<br><br>Thanks for that lead. I'll try it. <br><br>Kind regards,<br><br>Sean</span></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 5, 2017 at 6:08 PM Oyvind Albrigtsen <<a href="mailto:oalbrigt@redhat.com" target="_blank">oalbrigt@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 04/12/17 16:29 +0000, Sean Beeson wrote:<br>
>Thank you for the replay, Oyvind. I gave it plenty of time to start up.<br>
>using tomcat_name="tomcat" it starts what I can only call a lifeless PID,<br>
>but it never seems to actually start up. The catalina.out file is never<br>
>touched, so it never has anything in it to indicate a problem. Pacemaker<br>
>does seem to be managing it though because, although this PID shows, it<br>
>will report it as not running and then move everything to the other node.<br>
>It will do that a couple times, but that eventually stops as well.<br>
Try "pcs resource disable <resource>" and then "pcs resource<br>
debug-start --full <resource>". The last command will start the<br>
resource and show you which commands are run, so you can troubleshoot<br>
why it's failing.<br>
><br>
>Kind regards,<br>
><br>
>Sean<br>
><br>
>On Thu, Nov 30, 2017 at 10:40 PM Oyvind Albrigtsen <<a href="mailto:oalbrigt@redhat.com" target="_blank">oalbrigt@redhat.com</a>><br>
>wrote:<br>
><br>
>> Tomcat can be very slow at startup depending on the modules you use,<br>
>> so you can either disable modules you arent using to make it start<br>
>> faster or set a higher start timeout via "pcs resource <resource> op<br>
>> start interval=".<br>
>><br>
>> On 30/11/17 13:26 +0000, Sean Beeson wrote:<br>
>> >Hi, list.<br>
>> ><br>
>> >This is a pretty basic question. I have gone through what I could find on<br>
>> >setting up Tomcat service as a resource to a cluster, but did not find<br>
>> >exactly the issue I am having. Sorry, if it has been covered before.<br>
>> ><br>
>> >I am attempting this on centos-release-7-4.1708.el7.centos.x86_64.<br>
>> >The pcs I have installed is pcs-0.9.158-6.el7.centos.x86_64<br>
>> >The resource-agents installed is resource-agents-3.9.5-105.el7_4.2.x86_64<br>
>> ><br>
>> >I have DRBD, MySql, and a virtual IP running spectacularly well and they<br>
>> >failover perfectly and do exactly what I want them. I can add Tomcat as a<br>
>> >resource just fine, but it never starts and I can not fined anything in<br>
>> any<br>
>> >log file that indicates why. Pcs does at some point know to check on it,<br>
>> >but simply says Tomcat is not running. If I run everything manually on in<br>
>> a<br>
>> >cluster I can manually get Tomcat to start with systemctl. Here is how I<br>
>> am<br>
>> >try to configure it.<br>
>> ><br>
>> >[root@centos7-ha-lab-01 ~]# pcs status<br>
>> >Cluster name: ha-cluster<br>
>> >Stack: corosync<br>
>> >Current DC: centos7-ha-lab-02-cr (version 1.1.16-12.el7_4.4-94ff4df) -<br>
>> >partition with quorum<br>
>> >Last updated: Thu Nov 30 21:03:36 2017<br>
>> >Last change: Thu Nov 30 20:53:37 2017 by root via cibadmin on<br>
>> >centos7-ha-lab-01-cr<br>
>> ><br>
>> >2 nodes configured<br>
>> >6 resources configured<br>
>> ><br>
>> >Online: [ centos7-ha-lab-01-cr centos7-ha-lab-02-cr ]<br>
>> ><br>
>> >Full list of resources:<br>
>> ><br>
>> > Master/Slave Set: DRBD_data_clone [DRBD_data]<br>
>> > Masters: [ centos7-ha-lab-01-cr ]<br>
>> > Slaves: [ centos7-ha-lab-02-cr ]<br>
>> > fsDRBD_data (ocf::heartbeat:Filesystem): Started<br>
>> centos7-ha-lab-01-cr<br>
>> > OuterDB_Service (systemd:mysqld): Started centos7-ha-lab-01-cr<br>
>> > OuterDB_VIP (ocf::heartbeat:IPaddr2): Started centos7-ha-lab-01-cr<br>
>> > tomcat_OuterWeb (ocf::heartbeat:tomcat): Stopped<br>
>> ><br>
>> >Failed Actions:<br>
>> >* tomcat_OuterWeb_start_0 on centos7-ha-lab-01-cr 'unknown error' (1):<br>
>> >call=67, status=Timed Out, exitreason='none',<br>
>> > last-rc-change='Thu Nov 30 20:56:22 2017', queued=0ms, exec=180003ms<br>
>> >* tomcat_OuterWeb_start_0 on centos7-ha-lab-02-cr 'unknown error' (1):<br>
>> >call=57, status=Timed Out, exitreason='none',<br>
>> > last-rc-change='Thu Nov 30 20:53:23 2017', queued=0ms, exec=180003ms<br>
>> ><br>
>> >Daemon Status:<br>
>> > corosync: active/enabled<br>
>> > pacemaker: active/enabled<br>
>> > pcsd: active/enabled<br>
>> ><br>
>> >I have tried with and without tomcat_name=tomcat_OuterWeb and tomcat and<br>
>> >root for tomcat_user=. Neither work.<br>
>> ><br>
>> >Here is the command I am using to add it.<br>
>> ><br>
>> >pcs resource create tomcat_OuterWeb ocf:heartbeat:tomcat<br>
>> >java_home="/opt/java/jre1.7.0_80" catalina_home="/opt/tomcat7"<br>
>> >catalina_opts="-Dbuild.compiler.emacs=true -Dfile.encoding=UTF-8<br>
>> >-Djava.util.logging.config.file=/opt/tomcat7/conf/log4j.properties<br>
>> >-Dlog4j.configuration=file:/opt/tomcat7/conf/log4j.properties -Xms1024m<br>
>> >-Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m" tomcat_user="root" op<br>
>> >monitor interval="15s" op start timeout="180s"<br>
>> ><br>
>> >I have tried also the most basic.<br>
>> >pcs resource create tomcat_OuterWeb ocf:heartbeat:tomcat<br>
>> >java_home="/opt/java/jre1.7.0_80" catalina_home="/opt/tomcat7"<br>
>> >tomcat_name="tomcat_OuterWeb" tomcat_user="root" op monitor interval="15s"<br>
>> >op start timeout="180s"<br>
>> ><br>
>> >I other examples I have seen they usually use params then the options in<br>
>> >these command to add Tomcat as a resource, but when I use that it tells<br>
>> me<br>
>> >that is an unrecognized option and it then accepts the options without it<br>
>> >just fine. I was led to think this was a difference in version of the<br>
>> >resource-agents perhaps.<br>
>> ><br>
>> >Any idea why I can not get Tomcat to start or some lead to the logging I<br>
>> >could look at to understand why it is failing would be great. Nothing<br>
>> shows<br>
>> >in messages, catalina.out, pcsd.log, nor the resource<br>
>> >log--tomcat_OuterWeb.log. However, it does make the resource log, but it<br>
>> >only has this in it, which seems to be false:<br>
>> ><br>
>> >2017/11/30 20:50:22: start ===========================<br>
>> >2017/11/30 20:53:22: stop ###########################<br>
>> >2017/11/30 20:56:22: start ===========================<br>
>> >2017/11/30 20:59:22: stop ###########################<br>
>> ><br>
>> >The only other thing is: * tomcat_OuterWeb_start_0 on centos7-ha-lab-01-cr<br>
>> >'unknown error' (1): call=67, status=Timed Out, exitreason='none',<br>
>> ><br>
>> >Again, any ideas would be appreciated. Thank you.<br>
>> ><br>
>> >Kind regards,<br>
>> ><br>
>> >Sean<br>
>><br>
>> >_______________________________________________<br>
>> >Users mailing list: <a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a><br>
>> ><a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/mailman/listinfo/users</a><br>
>> ><br>
>> >Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
>> >Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
>> >Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
>><br>
>><br>
>> _______________________________________________<br>
>> Users mailing list: <a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a><br>
>> <a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/mailman/listinfo/users</a><br>
>><br>
>> Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
>> Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
>> Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
>><br>
<br>
>_______________________________________________<br>
>Users mailing list: <a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a><br>
><a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/mailman/listinfo/users</a><br>
><br>
>Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
>Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
>Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
<br>
<br>
_______________________________________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a><br>
<a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/mailman/listinfo/users</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
</blockquote></div></blockquote></div></div>