How To Set Up A Loadbalanced High-Availability Apache Cluster - Page 2

Discussion in 'HOWTO-Related Questions' started by jeichande, Oct 23, 2007.

  1. jeichande

    jeichande New Member

    Alo,
    i´m using your tutorial to setup apache cluster in vmware. I have the same configuration. But when i test de load balancers using the command "ip addr sh eth0" it doesnt show the virtual ip adress 192.168.0.105. this is the output:

    loadb1
    2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:0c:29:08:8c:a3 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.103/24 brd 192.168.0.255 scope global eth0
    inet6 fe80::20c:29ff:fe08:8ca3/64 scope link
    valid_lft forever preferred_lft forever


    loadb2

    2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:0c:29:60:01:e0 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.104/24 brd 192.168.0.255 scope global eth0
    inet6 fe80::20c:29ff:fe60:1e0/64 scope link
    valid_lft forever preferred_lft forever

    and i have not any sucess in other load balancers tests. i´m using ubuntu.
    can u help me?

    bye,

    Jeichande
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Any errors in your logs?
    Have you double-checked your configuration? Maybe a typo or something like that...
     
  3. jeichande

    jeichande New Member

    Alo,

    Now is working, i restarted the machines and run the following commands

    update-rc.d heartbeat start 75 2 3 4 5 . stop 05 0 1 6 .
    update-rc.d -f ldirectord remove

    /etc/init.d/ldirectord stop
    /etc/init.d/heartbeat start

    But i still have a little problem, when i test the page with the virtual ip address 192.168.0.105 only works if the loadb2 is started, when i stopped the loadb1 does not take care of the service.

    There something wrong in my configuration?


    Thanks

    Bye,
    Jeichande
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Take a look at /var/log/syslog. Are there any heartbeat warnings/errors?
    What's in /etc/ha.d/ha.cf and /etc/ha.d/haresources?
     
  5. jeichande

    jeichande New Member

    Hi,
    These are the warnings which i found.

    loadb1

    /var/log/syslog
    Oct 28 23:21:18 loadb1 heartbeat: ERROR: Cannot locate resource script Ipaddr2
    Oct 28 23:21:19 loadb1 heartbeat: info: Retrying failed stop operation [Ipaddr2::192.168.0.105/24/eth0/192.168.0.255]

    Oct 28 23:21:06 loadb1 heartbeat: ERROR: Resource script for Ipaddr2::192.168.0.105/24/eth0/192.168.0.255 probably not LSB-compliant.
    Oct 28 23:21:07 loadb1 heartbeat: WARN: it (Ipaddr2::192.168.0.105/24/eth0/192.168.0.255) MUST succeed on a stop when already stopped


    /etc/ha.d/ha.cf

    logfacility local0
    bcast eth0 # Linux
    mcast eth0 225.0.0.1 694 1 0
    auto_failback off
    node loadb1
    node loadb2
    respawn hacluster /usr/lib/heartbeat/ipfail
    apiauth ipfail gid=haclient uid=hacluster



    /etc/ha.d/haresources

    loadb1 \
    ldirectord::ldirectord.cf \
    LVSSyncDaemonSwap::master \
    Ipaddr2::192.168.0.105/24/eth0/192.168.0.255





    loadb2


    /var/log/syslog
    Oct 28 22:55:34 loadb2 heartbeat[4698]: WARN: node loadb1: is dead

    /etc/ha.d/ha.cf


    logfacility local0
    bcast eth0 # Linux
    mcast eth0 225.0.0.1 694 1 0
    auto_failback off
    node loadb1
    node loadb2
    respawn hacluster /usr/lib/heartbeat/ipfail
    apiauth ipfail gid=haclient uid=hacluster




    /etc/ha.d/haresources

    loadb2 \
    ldirectord::ldirectord.cf \
    LVSSyncDaemonSwap::master \
    IPaddr2::192.168.0.105/24/eth0/192.168.0.255


    Thanks

    Bye,
    Jeichande
     
  6. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/ha.d/resources? However, you might want to try to use
    Code:
    IPaddr::192.168.0.105/24/eth0/192.168.0.255
    instead.
     

Share This Page