[Linux-HA] Problem with starting Apache and MySQL

dembi dembi at ukr.net
Thu Oct 15 03:50:31 MDT 2009


Hi all,

I have three servers: aps-1, aps-2, aps-3

On server aps-3 should start drbd with two resources ‘app’ and ‘mysql’, two
virtual IP’s, apache and mysql.
In case when aps-3 is down on server aps-1 should be started drbd with
resource of ‘app’, Virtual IP 10.11.4.1 and Apache.
In case when aps-3 is down on server aps-2 should be started drbd with
resource of ‘mysql’, Virtual IP 10.11.4.2 and Mysql.

APS-1 has real IP 10.11.4.4 apache2 2.2.9-10+lenny4
APS-2 has real IP 10.11.4.5 mysql-server 5.0.51a-24+lenny2, 
APS-3 has real IP 10.11.4.3 mysql-server 5.0.51a-24+lenny2, apache2
2.2.9-10+lenny4

I have problem with starting Apache and Mysql.
Please explain me why I can start Apache and Mysql on any servers?

Thanks in advance,

Crm_mon to show following:

============
Last updated: Thu Oct 15 11:47:19 2009
Current DC: aps-1 (e79f7f65-ffb4-415f-86d3-f4dc735a5c73)
3 Nodes configured.
4 Resources configured.
============

Node: aps-3 (d305cc9a-6c27-4de0-ab2d-775419549bde): online
Node: aps-2 (19a6463b-7a32-4f10-8849-7fbc63bb7bfe): online
Node: aps-1 (e79f7f65-ffb4-415f-86d3-f4dc735a5c73): online

Master/Slave Set: mysql-drbd0
    drbd1:0     (heartbeat::ocf:drbd):  Master aps-3
    drbd1:1     (heartbeat::ocf:drbd):  Slave aps-2
Master/Slave Set: app-drbd
    drbd0:0     (heartbeat::ocf:drbd):  Master aps-3
    drbd0:1     (heartbeat::ocf:drbd):  Started aps-1
Resource Group: mysql_group
    virtual-mysql-ip    (heartbeat::ocf:IPaddr2):       Started aps-3
    fs-mysql    (heartbeat::ocf:Filesystem):    Started aps-3
    mysql       (heartbeat::ocf:mysql): Stopped
Resource Group: app_group
    virtual-app-ip      (heartbeat::ocf:IPaddr2):       Started aps-3
    fs-app      (heartbeat::ocf:Filesystem):    Started aps-3
    apache      (heartbeat::ocf:apache):        Stopped

Failed actions:
    apache_start_0 (node=aps-3, call=54, rc=-2): Timed Out
    mysql_start_0 (node=aps-3, call=92, rc=2): complete
    mysql_start_0 (node=aps-2, call=27, rc=-2): Timed Out
    apache_start_0 (node=aps-1, call=38945, rc=-2): Timed Out
My cib confing please see in text below:

   <configuration>
     <crm_config>
       <cluster_property_set id="cib-bootstrap-options">
         <attributes>
           <nvpair id="cib-bootstrap-options-dc-version" name="dc-version"
value="2.1.3-node: 552305612591183b1628baa5bc6e903e0f1e26a3"/>
           <nvpair id="cib-bootstrap-options-last-lrm-refresh"
name="last-lrm-refresh" value="1255595723"/>
         </attributes>
       </cluster_property_set>
     </crm_config>
     <nodes>
       <node id="d305cc9a-6c27-4de0-ab2d-775419549bde" uname="aps-3"
type="normal"/>
       <node id="19a6463b-7a32-4f10-8849-7fbc63bb7bfe" uname="aps-2"
type="normal"/>
       <node id="e79f7f65-ffb4-415f-86d3-f4dc735a5c73" uname="aps-1"
type="normal"/>
     </nodes>
     <resources>
       <master_slave id="mysql-drbd0">
         <meta_attributes id="ma-mysql-drbd0">
           <attributes>
             <nvpair id="ma-mysql-drbd0-1" name="clone_max" value="2"/>
             <nvpair id="ma-mysql-drbd0-2" name="clone_node_max" value="1"/>
             <nvpair id="ma-mysql-drbd0-3" name="master_max" value="1"/>
             <nvpair id="ma-mysql-drbd0-4" name="master_node_max"
value="1"/>
             <nvpair id="ma-mysql-drbd0-6" name="globally_unique"
value="false"/>
             <nvpair id="ma-mysql-drbd0-5" name="notify" value="true"/>
           </attributes>
         </meta_attributes>
         <primitive id="drbd1" class="ocf" provider="heartbeat" type="drbd">
           <instance_attributes id="ia-drbd0">
             <attributes>
               <nvpair id="ia-drbd1-1" name="drbd_resource" value="mysql"/>
             </attributes>
           </instance_attributes>
           <operations>
             <op id="op-drbd1-1" name="monitor" interval="5s" timeout="10s"
role="Master"/>
             <op id="op-drbd1-2" name="monitor" interval="6s" timeout="10s"
role="Slave"/>
           </operations>
         </primitive>
       </master_slave>       <master_slave id="app-drbd">
         <meta_attributes id="ma-app-drbd">
           <attributes>
             <nvpair id="ma-app-drbd-1" name="clone_max" value="2"/>
             <nvpair id="ma-app-drbd-2" name="clone_node_max" value="1"/>
             <nvpair id="ma-app-drbd-3" name="master_max" value="1"/>
             <nvpair id="ma-app-drbd-4" name="master_node_max" value="1"/>
             <nvpair id="ma-app-drbd-6" name="globally_unique"
value="false"/>
             <nvpair id="ma-app-drbd-5" name="notify" value="true"/>
           </attributes>
         </meta_attributes>
         <primitive id="drbd0" class="ocf" provider="heartbeat" type="drbd">
           <instance_attributes id="ia-app">
             <attributes>
               <nvpair id="ia-app-1" name="drbd_resource" value="app"/>
             </attributes>
           </instance_attributes>
           <operations>
             <op id="op-drbd0-1" name="monitor" interval="5s" timeout="10s"
role="Master"/>
             <op id="op-drbd0-2" name="monitor" interval="6s" timeout="10s"
role="Slave"/>
           </operations>
         </primitive>
       </master_slave>
       <group id="mysql_group">
         <meta_attributes id="ma-mysql">
           <attributes>
             <nvpair id="ma-mysql-1" name="target_role" value="started"/>
           </attributes>
         </meta_attributes>
         <primitive id="virtual-mysql-ip" class="ocf" type="IPaddr2"
provider="heartbeat">
           <operations>
             <op id="virtual-mysql-ip-check" name="monitor" interval="5s"
timeout="5s"/>
           </operations>
           <instance_attributes id="params-virtual-mysql-ip">
             <attributes>
               <nvpair id="virtual-mysql-ip-addr" name="ip"
value="10.11.4.2"/>
               <nvpair id="virtual-mysql-mask-addr" name="netmask"
value="16"/>
               <nvpair id="virtual-mysql-nic-addr" name="nic" value="eth0"/>
             </attributes>
           </instance_attributes>
         </primitive>
         <primitive class="ocf" provider="heartbeat" type="Filesystem"
id="fs-mysql">
           <operations>
             <op id="fs-mysql_mon" interval="5s" name="monitor"
timeout="5s"/>
           </operations>
           <instance_attributes id="ia-mysql">
             <attributes>
               <nvpair id="ia-mysql-1" name="fstype" value="ext3"/>
               <nvpair id="ia-mysql-2" name="directory" value="/opt"/>
               <nvpair id="ia-mysql-3" name="device" value="/dev/drbd1"/>
             </attributes>
           </instance_attributes>
         </primitive>
         <primitive id="mysql" class="ocf" provider="heartbeat"
type="mysql"/>
       </group>
       <group id="app_group">
         <meta_attributes id="ma-app">
           <attributes>
             <nvpair id="ma-app-group" name="target_role" value="started"/>
           </attributes>
         </meta_attributes>
         <primitive id="virtual-app-ip" class="ocf" type="IPaddr2"
provider="heartbeat">
           <operations>
             <op id="virtual-app-ip-check" name="monitor" interval="5s"
timeout="5s"/>
           </operations>
           <instance_attributes id="params-virtual-app-ip">
             <attributes>
               <nvpair id="virtual-app-ip-addr" name="ip"
value="10.11.4.1"/>
               <nvpair id="virtual-app-mask-addr" name="netmask"
value="16"/>
               <nvpair id="virtual-app-nic-addr" name="nic" value="eth0:1"/>
             </attributes>
           </instance_attributes>
         </primitive>
         <primitive class="ocf" provider="heartbeat" type="Filesystem"
id="fs-app">
           <operations>
             <op id="fs-app_mon" interval="5s" name="monitor" timeout="5s"/>
           </operations>
           <instance_attributes id="ia-app-group">
             <attributes>
               <nvpair id="ia-app-group-1" name="fstype" value="ext3"/>
               <nvpair id="ia-app-group-2" name="directory" value="/app"/>
               <nvpair id="ia-app-group-3" name="device"
value="/dev/drbd0"/>
             </attributes>
           </instance_attributes>
         </primitive>
         <primitive id="apache" class="ocf" provider="heartbeat"
type="apache"/>
       </group>
     </resources>
     <constraints>
       <rsc_order id="ip_fs_after_drbd" from="mysql_group" action="start"
to="mysql-drbd0" to_action="promote" type="after"/>
       <rsc_colocation id="ip_fs_on_drbd" to="mysql-drbd0" to_role="master"
from="mysql_group" score="INFINITY"/>
       <rsc_order id="order_mysql_after_ip" from="mysql" action="start"
type="after" to="virtual-mysql-ip" to_action="start"/>
       <rsc_colocation id="colocation_mysql_ip" from="mysql"
to="virtual-mysql-ip" score="INFINITY"/>
       <rsc_location id="rsc_location_mysql" rsc="mysql_group">
         <rule id="prefered_location_mysql-1" score="20">
           <expression attribute="#uname"
id="prefered_location_mysql_expr-1" operation="eq" value="aps-2"/>
         </rule>
         <rule id="prefered_location_mysql-2" score="INFINITY">
           <expression attribute="#uname"
id="prefered_location_mysql_expr-2" operation="eq" value="aps-3"/>
         </rule>
         <rule id="prefered_location_mysql-3" score="-INFINITY">
           <expression attribute="#uname"
id="prefered_location_mysql_expr-3" operation="eq" value="aps-1"/>
         </rule>
       </rsc_location>
       <rsc_order id="ip_fs_after_drbd-app" from="app_group" action="start"
to="app-drbd" to_action="promote" type="after"/>
       <rsc_colocation id="ip_fs_on_drbd-app" to="app-drbd" to_role="master"
from="app_group" score="INFINITY"/>
       <rsc_location id="rsc_location_app" rsc="app_group">
         <rule id="prefered_location_app-3" score="20">
           <expression attribute="#uname" id="prefered_location_app_expr-1"
operation="eq" value="aps-1"/>
         </rule>
         <rule id="prefered_location_app-1" score="INFINITY">
           <expression attribute="#uname" id="prefered_location_app_expr-2"
operation="eq" value="aps-3"/>
         </rule>
         <rule id="prefered_location_app-2" score="-INFINITY">
           <expression attribute="#uname" id="prefered_location_app_expr-3"
operation="eq" value="aps-2"/>
         </rule>
       </rsc_location>
       <rsc_order id="order_apache_after_IP" from="apache" action="start"
type="after" to="virtual-app-ip" to_action="start"/>
       <rsc_colocation id="colocation_Apache_IP" from="apache"
to="virtual-app-ip" score="INFINITY"/>
     </constraints>
   </configuration>

-- 
View this message in context: http://www.nabble.com/Problem-with-starting-Apache-and-MySQL-tp25905739p25905739.html
Sent from the Linux-HA mailing list archive at Nabble.com.



More information about the Linux-HA mailing list