Hello again,

Dejan Muhamedagic wrote:
Hi,

On Mon, Oct 08, 2007 at 11:04:42AM -0400, Tony Nelson wrote:
Hi all,

I thought I was making good progress setting up a 2 node cluster to run DRBD, Tomcat and Apache.

I setup DRBD first, and got that working fine. Added an IP address that follows the DRBD master. Added Pingd so the nodes would failover on connectivity loss.. great!

Adding Tomcat and Apache should be a breeze right. I add them both and the fire up just fine on the first server. As soon as I try to get it to failover, I get the dreaded "tomcat cannot run anywhere".

There is of course a lot more in my logs, but..

Oct 5 14:15:55 thebrain pengine: [9928]: WARN: native_color: Resource tomcat cannot run anywhere Oct 5 14:15:55 thebrain pengine: [9928]: WARN: native_color: Resource apache cannot run anywhere

I know for a fact that neither tomcat nor apache is running on either node at this point. Restarting heartbeat or rebooting the boxes doesn't help either now.

I also know that I must have a configuration issue somewhere, and for the life of me I just can't spot it.

The problem is most probably somewhere with the resource agents
apache2 and tomcat5. The logs should say.

BTW, you should be better off with the OCF apache agent. There's
also as of recently an OCF tomcat agent, so you may try that one
as well. Both are part of the Heartbeat package package.


Ok, I downloaded the tomcat OCF agent and put it in /etc/ha.d/resources and can find it in the GUI just fine. When trying to set the parameters for the resource, the gui just prompts me with the numbers 1-5. I looked at the OCF agent and found

#######################################################################
# OCF parameters:
#   OCF_RESKEY_tomcat_name - The name of the resource. Default is None
# OCF_RESKEY_script_log - A destination of the log of this script. Default /v
ar/log/OCF_RESKEY_tomcat_name.log
# OCF_RESKEY_tomcat_stop_timeout - Time-out at the time of the stop. Default
is 5
# OCF_RESKEY_tomcat_suspend_trialcount - The re-try number of times awaiting
a stop. Default is 10
# OCF_RESKEY_tomcat_user - A user name to start a resource. Default is root # OCF_RESKEY_statusurl - URL for state confirmation. Default is http://127.0.0
.1:8080
#   OCF_RESKEY_java_home - Home directory of the Java. Default is None
#   OCF_RESKEY_catalina_home - Home directory of Tomcat. Default is None
# OCF_RESKEY_catalina_pid - A PID file name of Tomcat. Default is OCF_RESKEY_
catalina_home/logs/catalina.pid
###############################################################################

So I added the parameters by name (omitting OCF_RESKEY_ of course).

Which created this XML

<primitive id="tomcat" class="heartbeat" type="tomcat" provider="heartbeat">
         <instance_attributes id="tomcat_instance_attrs">
           <attributes>
<nvpair id="tomcat_target_role" name="target_role" value="started"/> <nvpair id="d3169821-41cd-4ee9-8c0e-ce8fc265a30a" name="tomat_user" value="ih"/> <nvpair id="91c945d0-3461-47a9-b035-7e1f7481564b" name="catalina_home" value="/ha/ih/tools/tomcat"/>
           </attributes>
         </instance_attributes>
         <operations>
<op id="fff128c5-0aee-4ca8-8bf3-018903254f0e" name="start" interval="0s" timeout="120s"/> <op id="d54e5f92-ef78-4960-9e43-6a6a81d1574e" name="stop" interval="0s" timeout="120s"/> <op id="202cc455-4fba-447b-9b34-1205990d70f7" name="monitor" interval="60s" timeout="15s"/>
         </operations>
       </primitive>
<primitive id="apache" class="heartbeat" type="apache" provider="heartbeat">
         <instance_attributes id="apache_instance_attrs">
           <attributes>
<nvpair id="apache_target_role" name="target_role" value="stopped"/>
           </attributes>
         </instance_attributes>
       </primitive>

Tomcat won't start and in the log I find

Oct 8 11:56:59 thebrain crm_verify: [25387]: WARN: unpack_rsc_op: Processing failed op tomcat_start_0 on thebrain: Error

crm_verify gives the following information

thebrain:/var/lib/heartbeat/crm # crm_verify -L -V
crm_verify[25462]: 2007/10/08_11:59:20 WARN: unpack_rsc_op: Processing failed op tomcat_start_0 on thebrain: Error crm_verify[25462]: 2007/10/08_11:59:20 WARN: unpack_rsc_op: Processing failed op tomcat_stop_0 on thebrain: Error

Unfortunately, I'm not sure what it all means. Any help would be greatly appreciated.

Tony Nelson
Starpoint Solutions




Thanks,

Dejan

If I can provide any more information, or anyone can educate me as to the errors of my ways, I would really appreciate it.

OS: OpenSuse 10.2
Heartbeat: 2.1.2

Thanks
Tony Nelson
Starpoint Solutions


[ snipped ]
begin:vcard
fn:Tony Nelson
n:Nelson;Tony
org:Starpoint Solutions
adr;dom:2nd Floor;;115 Broadyway;New York;NY;10006
email;internet:[EMAIL PROTECTED]
title:Dir of IT Operation
x-mozilla-html:FALSE
url:http://www.starpoint.com
version:2.1
end:vcard

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to