|
Web Load Balancing (apache+heartbeat+ldirector) : Unable to connect to real servers
Hi Friends,
I have configured web load balancing using:
1.HeartBeat
2.Ldirector
3.Apache
I am unable to access web services using Ldirector.
My ldirectord.cf:
########################################
checktimeout=10
checkinterval=2
autoreload=yes
#logfile="local0"
logfile="/var/log/ldirectord.log"
quiescent=yes
virtual=67.23.10.160:80
real=10.176.46.92:80 gate
real=10.176.46.93:80 gate
fallback=127.0.0.1:80 gate
service=http
request="ldirector.html"
receive="Test Page"
scheduler=rr
protocol=tcp
checktype=negotiate
########################################
I can access my web servers directly using it's static IP's.
Initial ipvsadm output:
root@loadb1:~# ipvsadm -Ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 67.23.10.160:80 rr
-> 10.176.46.93:80 Route 1 0 0
-> 10.176.46.92:80 Route 1 0 0
After accessing my VIP first time following is the output:
root@loadb1:~# ipvsadm -Ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 67.23.10.160:80 rr
-> 10.176.46.93:80 Route 1 0 0
-> 10.176.46.92:80 Route 1 0 1
After 2nd access output is:
root@loadb1:~# ipvsadm -Ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 67.23.10.160:80 rr
-> 10.176.46.93:80 Route 1 0 1
-> 10.176.46.92:80 Route 1 0 1
That means ldirectord receiving http connections and sending them to real servers. I am unable to understand where is the problem ? can any body help me ?
sysctl -p
Load Balancer:
kernel.printk = 4 4 1 7
kernel.maps_protect = 1
fs.inotify.max_user_watches = 524288
vm.mmap_min_addr = 65536
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.ip_forward = 1
Webserver:
kernel.printk = 4 4 1 7
kernel.maps_protect = 1
fs.inotify.max_user_watches = 524288
vm.mmap_min_addr = 65536
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.eth0.arp_ignore = 1
net.ipv4.conf.eth1.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
net.ipv4.conf.eth0.arp_announce = 2
net.ipv4.conf.eth1.arp_announce = 2
I need urgent help. Waitting for reply.
Thanks.
|