LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 10-15-2009, 06:25 AM   #1
dipakbiswal
LQ Newbie
 
Registered: Sep 2009
Posts: 6

Rep: Reputation: 0
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.
 
Old 11-08-2009, 05:34 AM   #2
EricTRA
Guru
 
Registered: May 2009
Location: Barcelona, Spain
Distribution: LMDE + Linux 3.2.0-1.dmz.6-amd64, RHEL5+6, Mulltiple testing
Posts: 6,192
Blog Entries: 1

Rep: Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149
Hello,

Maybe silly question but did you configure the real servers (the apache nodes) to listen on the virtual IP on the loopback interface? If you didn't configure the nodes to listen on that IP than they will not accept connections from the load balancer. The IP gets send along in the HTTP header as far as I know and if the node doesn't listen on that IP than you get no response although the load balancer detects it as being 'alive'.

Kind regards,

Eric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Load Balancing using heartbeat... won't communicate with second L.B. HelpMe2877 Linux - Networking 0 04-11-2009 07:44 PM
i need help for load balancing setting apache web server gnu_gcc Linux - Server 2 06-23-2008 04:06 PM
Load Balancing Between Servers ricky123 Linux - Newbie 7 01-24-2008 01:43 AM
LVS/Tun+heartbeat+ldirector subzero_ice Linux - Networking 2 02-02-2007 10:33 PM
same: load balancing of mail servers. bswrj Linux - General 1 05-12-2003 08:41 AM


All times are GMT -5. The time now is 08:19 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration