LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Load Balancing HTTP traffic does not seem to be working.

To: scott@xxxxxxxxxxx
Subject: Re: Load Balancing HTTP traffic does not seem to be working.
Cc: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
From: Francisco Gimeno <kikov@xxxxxxxxx>
Date: Mon, 8 May 2006 17:18:50 +0200
Hi..

well I don't see clearly what's your architecture... but remember.. In the real servers you don't need ip_vs nor ldirectord nor heartbeat.

The VIP is owned by the Director Box ( ie: balancer ) that should be running ip_vs and ldirector and heartbeat ( if you want to have another Director Box for backup purposes ).

If you want to make things simpler: forget for one moment the heartbeat.

Just run ldirectord in the Director Box. In this case, you have to enable manually a eth0:0 ip alias in that box

balancer# ifconfig eth0:0 VIP netmask 255.255.255.255
realserver1# ifconfig lo:0 VIP netmask 255.255.255.255 ; route add - host VIP dev lo realserver2# ifconfig lo:0 VIP netmask 255.255.255.255 ; route add - host VIP dev lo

then run ldirectord...
and see what's happening in the director with ipvsadm -L -n
You should see weight: 1 ( or whatever you have configured in ldirectord ) if the Server has been correctly detected, or weight: 0 if the ldirector check failed...

BR,
Francisco Gimeno
Yes I verified this these items below.  The lo:0 card I have is not up
on both Machines.. Should that be the case?  The machine that is my
ldirectory Active node and realserver is
bosdamweb52 root]# /etc/ha.d/resource.d/LVSSyncDaemonSwap master status
master running
(ipvs_syncmaster pid: 25685)

This node is showing the apahce page.

[root@bosdamweb52 root]# ip add sh
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
   link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
   inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
4: eth0: <BROADCAST,MULTICAST,ALLMULTI,UP> mtu 1500 qdisc pfifo_fast qlen 1000
   link/ether 00:30:48:80:4b:8d brd ff:ff:ff:ff:ff:ff
   inet 172.16.60.40/24 brd 172.16.60.255 scope global eth0
   inet 172.16.60.233/24 brd 172.16.60.255 scope global secondary eth0
5: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
   link/ether 00:30:48:80:4b:8e brd ff:ff:ff:ff:ff:ff


[root@bosdamweb53 ha.d]# ip add sh
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
   link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
   inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
   inet 172.16.60.233/32 brd 172.16.60.255 scope global lo:0
4: eth0: <BROADCAST,MULTICAST,ALLMULTI,UP> mtu 1500 qdisc pfifo_fast qlen 1000
   link/ether 00:30:48:80:4b:da brd ff:ff:ff:ff:ff:ff
   inet 172.16.60.41/24 brd 172.16.60.255 scope global eth0
5: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
   link/ether 00:30:48:80:4b:d9 brd ff:ff:ff:ff:ff:ff

Im also reading another post someone sent.
http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.LVS- NAT.html#one_network

I currently have my default Gateway set to my Router not the director.

Thanks for your continuing help on this.








On 5/8/06, Francisco Gimeno <kikov@xxxxxxxxx> wrote:
hi

the second part

have you added the loopbacks ip in the real servers ?

# ifconfig lo:1 172.16.60.233 netmask 255.255.255.255
# route add -host 172.16.60.233 dev lo

have you configured the VirtualHost in Apache for 172.16.60.233 ?

go to the real servers, and check there:
$ telnet 172.16.60.233 80
GET / HTTP/1.1
Host: HOSTNAME
<Enter>



> Hello Francicso thanks for the response.
> I added another real server real=172.16.60.25:80 gate and no luck.
> Seems I can only access the machine that currently has the VIP
> established.
>
> scott

_______________________________________________
LinuxVirtualServer.org mailing list - lvs- users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://www.in-addr.de/mailman/listinfo/lvs-users



--
Scott Comboni
President
Zenplex Inc.
132 Pepes Farm Road Unit #6
Milford CT, 06460



<Prev in Thread] Current Thread [Next in Thread>