View Single Post
  #1  
Old 4th April 2007, 12:56
manurro manurro is offline
Junior Member
 
Join Date: Apr 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question Loadbalanced High-Availability Apache Cluster

Hi all,

I'm building a Loadbalanced HA Apache Cluster following the HOW-TO from Falko.
I've done everything as he explained just changing my nodenames and IP's, and it all seems to be fine, but when I start heartbeat on both loadb servers, they both become active, when they're supposed to be one active and the other on hot-standby. I've checked config files a thousand times and I can't guess what's going wrong. Below I attach my config files on load balancers.

LOADB1 & LOADB2 (as config files must be identical)

/etc/ha.d/ha.conf

Code:
logfacility     local0
bcast   eth0
mcast   eth0 225.0.0.1 694 1 0
auto_failback on
node loadb1.mydomain.com
node loadb2.mydomain.com
respawn hacluster /usr/lib/heartbeat/ipfail
apiauth ipfail gid=haclient uid=hacluster
/etc/ha.d/haresources

Code:
loadb1.mydomain.com ldirectord::ldirectord.cf LVSSyncDaemonSwap::master IPaddr2::xxx.xxx.xxx.xxx/27/eth0/nnn.nnn.nnn.nnn
(Where xxx.xxx.xxx.xxx is the VIP and nnn.nnn.nnn.nnn the network address)

/etc/ha.d/ldirectord.cf

Code:
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes

virtual=xxx.xxx.xxx.xxx:80
        real=yyy.yyy.yyy.yyy:80 gate
        real=zzz.zzz.zzz.zzz:80 gate
        fallback=127.0.0.1:80 gate
        service=http
        request="ldirector.html"
        receive="Test Page"
        scheduler=rr
        protocol=tcp
        checktype=negotiate
(yyy.yyy.yyy.yyy and zzz.zzz.zzz.zzz are the apache nodes)

That's the output a few seconds after I started heartbeat on both servers:

Loadb1

Code:
# ip addr sh eth0
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:17:08:50:3e:f6 brd ff:ff:ff:ff:ff:ff
    inet aaa.aaa.aaa.aaa/27 brd nnn.nnn.nnn.nnn scope global eth0
    inet xxx.xxx.xxx.xxx/27 brd nnn.nnn.nnn.nnn scope global secondary eth0
    inet6 fe80::217:8ff:fe50:3ef6/64 scope link
       valid_lft forever preferred_lft forever
Loadb2

Code:
# ip addr sh eth0
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:16:35:5c:f8:f4 brd ff:ff:ff:ff:ff:ff
    inet bbb.bbb.bbb.bbb/27 brd nnn.nnn.nnn.nnn scope global eth0
    inet xxx.xxx.xxx.xxx/27 brd nnn.nnn.nnn.nnn scope global secondary eth0
    inet6 fe80::217:8ff:fe50:3ef6/64 scope link
       valid_lft forever preferred_lft forever
(aaa.aaa.aaa.aaa and bbb.bbb.bbb.bbb are the adrresses for loadb1 and loadb2).

My OS is Fedora Core 5 on all servers (load balancers and apache nodes).
Please anyone can help me?

Thanks in advance.
Reply With Quote
Sponsored Links