Hey there, I've created a thread somewhere, but I guess this is the right place to seek help for this, and here is my issue as stated there:
Ok guys, that was very much appreciated and I thank you again. For now, I just want to get heartbeat to function as it should and I don't want to create a whole new thread for it. As I said before, I have one public IP to access the server, and 2 nodes with 2 internal IPs, both are connected using Eth0, and what I want exactly is, if either one of Httpd or MySQL went down, the second node should take control and the virtual IP shall be assigned to it, until everything is in Sync again, then the primary or the favorible node should be taking over again. Heartbeat is starting just fine, detecting the 2 nodes, then I tried to shutdown one of them and see what would it say Code: cl_status nodestatus node02 dead And it found it was dead, but the failover isn't happening. I've tried to: Code: service httpd stop On node01, but it didn't switch anything to anything, so what I've been missing in my config? And here are the config I've tried in my ha.cf: Code: # Logging debug 1 use_logd true logfacility daemon # Misc Options traditional_compression off compression bz2 coredumps true # Communications udpport 21xxx bcast eth0 ucast eth0 10.25.45.81 ucast eth0 10.25.45.82 autojoin any # Thresholds (in seconds) keepalive 1 warntime 6 deadtime 10 initdead 15 crm respawn node node01 node node02 And I've tried 2 combinations for my cib.xml: 1: Code: <cib> <configuration> <crm_config/> <nodes/> <resources> ################################### ################################### <group id="group_apache"> <primitive id="ipaddr" class="ocf" type="IPaddr" provider="heartbeat"> <instance_attributes id="ia_ipaddr"> <attributes> <nvpair id="ia_ipaddr_ip" name="ip" value="91.xxx.xxx.xx"/> <nvpair id="ia_ipaddr_nic" name="nic" value="eth0"/> <nvpair id="ia_ipaddr_netmask" name="netmask" value="24"/> </attributes> </instance_attributes> </primitive> <primitive id="apache" class="ocf" type="apache" provider="heartbeat"> <instance_attributes id="ia_apache"> <attributes> <nvpair id="ia_apache_configfile" name="configfile" value="/etc/httpd/conf/httpd.conf"/> </attributes> </instance_attributes> </primitive> </group> ##################################### ##################################### <group id="node01"> <primitive class="ocf" id="IP1" provider="heartbeat" type="IPaddr"> <operations> <op id="IP1_mon" interval="10s" name="monitor" timeout="5s"/> </operations> <instance_attributes id="IP1_inst_attr"> <attributes> <nvpair id="IP1_attr_0" name="ip" value="10.25.45.81"/> <nvpair id="IP1_attr_1" name="netmask" value="255.255.255.0"/> <nvpair id="IP1_attr_2" name="nic" value="eth0"/> </attributes> </instance_attributes> </primitive> <primitive class="lsb" id="httpd1" provider="heartbeat" type="httpd"> <operations> <op id="jboss1_mon" interval="30s" name="monitor" timeout="20s"/> </operations> </primitive> </group> <group id="node02"> <primitive class="ocf" id="IP2" provider="heartbeat" type="IPaddr"> <operations> <op id="IP2_mon" interval="10s" name="monitor" timeout="5s"/> </operations> <instance_attributes id="IP2_inst_attr"> <attributes> <nvpair id="IP2_attr_0" name="ip" value="10.25.45.82"/> <nvpair id="IP2_attr_1" name="netmask" value="255.255.255.0"/> <nvpair id="IP2_attr_2" name="nic" value="eth0"/> </attributes> </instance_attributes> </primitive> <primitive class="lsb" id="httpd2" provider="heartbeat" type="httpd"> <operations> <op id="jboss2_mon" interval="30s" name="monitor" timeout="20s"/> </operations> </primitive> </group> </resources> <constraints> <rsc_location id="location_server1" rsc="node01"> <rule id="best_location_server1" score="100"> <expression_attribute="node01" id="best_location_server1_expr" operation="eq" value="10.25.45.81"/> </rule> </rsc_location> <rsc_location id="location_server2" rsc="node02"> <rule id="best_location_server2" score="100"> <expression_attribute="node02" id="best_location_server2_expr" operation="eq" value="10.25.45.82"/> </rule> </rsc_location> <rsc_location id="server1_connected" rsc="node01"> <rule id="server1_connected_rule" score="-INFINITY" boolean_op="or"> <expression id="server1_connected_undefined" attribute="pingd" operation="not_defined"/> <expression id="server1_connected_zero" attribute="pingd" operation="lte" value="0"/> </rule> </rsc_location> <rsc_location id="server2_connected" rsc="node02"> <rule id="server2_connected_rule" score="-INFINITY" boolean_op="or"> <expression id="server2_connected_undefined" attribute="pingd" operation="not_defined"/> <expression id="server2_connected_zero" attribute="pingd" operation="lte" value="0"/> </rule> </rsc_location> </constraints> </configuration> </cib> And I've tried without the group_apache resource: Code: <cib> <configuration> <crm_config/> <nodes/> <resources> <group id="node01"> <primitive class="ocf" id="IP1" provider="heartbeat" type="IPaddr"> <operations> <op id="IP1_mon" interval="10s" name="monitor" timeout="5s"/> </operations> <instance_attributes id="IP1_inst_attr"> <attributes> <nvpair id="IP1_attr_0" name="ip" value="10.25.45.81"/> <nvpair id="IP1_attr_1" name="netmask" value="255.255.255.0"/> <nvpair id="IP1_attr_2" name="nic" value="eth0"/> </attributes> </instance_attributes> </primitive> <primitive class="lsb" id="httpd1" provider="heartbeat" type="httpd"> <operations> <op id="jboss1_mon" interval="30s" name="monitor" timeout="20s"/> </operations> </primitive> </group> <group id="node02"> <primitive class="ocf" id="IP2" provider="heartbeat" type="IPaddr"> <operations> <op id="IP2_mon" interval="10s" name="monitor" timeout="5s"/> </operations> <instance_attributes id="IP2_inst_attr"> <attributes> <nvpair id="IP2_attr_0" name="ip" value="10.25.45.82"/> <nvpair id="IP2_attr_1" name="netmask" value="255.255.255.0"/> <nvpair id="IP2_attr_2" name="nic" value="eth0"/> </attributes> </instance_attributes> </primitive> <primitive class="lsb" id="httpd2" provider="heartbeat" type="httpd"> <operations> <op id="jboss2_mon" interval="30s" name="monitor" timeout="20s"/> </operations> </primitive> </group> </resources> <constraints> <rsc_location id="location_server1" rsc="node01"> <rule id="best_location_server1" score="100"> <expression_attribute="node01" id="best_location_server1_expr" operation="eq" value="10.25.45.81"/> </rule> </rsc_location> <rsc_location id="location_server2" rsc="node02"> <rule id="best_location_server2" score="100"> <expression_attribute="node02" id="best_location_server2_expr" operation="eq" value="10.25.45.82"/> </rule> </rsc_location> <rsc_location id="server1_connected" rsc="node01"> <rule id="server1_connected_rule" score="-INFINITY" boolean_op="or"> <expression id="server1_connected_undefined" attribute="pingd" operation="not_defined"/> <expression id="server1_connected_zero" attribute="pingd" operation="lte" value="0"/> </rule> </rsc_location> <rsc_location id="server2_connected" rsc="node02"> <rule id="server2_connected_rule" score="-INFINITY" boolean_op="or"> <expression id="server2_connected_undefined" attribute="pingd" operation="not_defined"/> <expression id="server2_connected_zero" attribute="pingd" operation="lte" value="0"/> </rule> </rsc_location> </constraints> </configuration> </cib> And here is my haresources Code: node01 91.xxx.xxx.xx httpd For the primitive class, I've put 'httpd', should I revert it back to apache? Although I'm using Httpd, but it may be something in the Syntax of Hearbeat. _______________________________________________ Linux-HA mailing list Linux-HA@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems