First your english is as good as mine. If you hadn't had said I would
never have known.
I think its because with LVS-DR the Real servers IP have to be on the
same net address. If you can change it to a 10.2.1.0 address and try
that.
Graham
On Thu, 2005-10-06 at 12:24, acanada wrote:
> Hi! I'm new here. I'm trying to build a lvs cluster for testing purposes. If
> it works fine I'll try to set up a real one, but by the moment I cannot
> aspire to good boxes. So there's my configuration:
>
> 2 directors:
> director server 10.2.1.43(Debian. VIP: 10.2.1.41)
> backup server 10.2.1.67(Debian. VIP: 10.2.1.41)
> using heartbeat (linked by only one way 10.2.1.0 by the moment because
> I'm
> just testing).
> 2 real servers:
> -realserver1: 10.2.1.38/255.255.254.0 (suse 9.2)
> -realserver2: 10.5.1.61/255.255.254.0 (fedora core)
> both with apache servers.
> I'm using ldirectord on both directors with this configuration file
> in /etc/ha.d/conf/ldirectordconfig.conf:
> checktimeout=20
> checkinterval=5
> autoreload=yes
> quiescent=no
> logfile="info"
> virtual=10.2.1.41:80
> real=10.5.1.61:80 gate 1 ".healthcheck.html", "OK"
> real=10.2.1.38:80 gate 1 ".healthcheck.html", "OK"
> service=http
> checkport=80
> protocol=tcp
> scheduler=wrr
> checktype=negotiate
> fallback=127.0.0.1:80
>
> In the real servers I run an init script like this one:
> #!/bin/bash
> VIP=10.2.1.41
> host=`/bin/hostname`
> case "$1" in
> start)
> # Start LVS-DR real server on this machine.
> /sbin/ifconfig lo down
> /sbin/ifconfig lo up
> echo 1 > /proc/sys/net/ipv4/conf/lo/arp_ignore
> echo 2 > /proc/sys/net/ipv4/conf/lo/arp_announce
> echo 1 > /proc/sys/net/ipv4/conf/all/arp_ignore
> echo 2 > /proc/sys/net/ipv4/conf/all/arp_announce
> /sbin/ifconfig lo:0 $VIP netmask 255.255.255.255 up
> /sbin/route add -host $VIP dev lo:0
> ;;
> stop)
> # Stop LVS-DR real server loopback device(s).
> /sbin/ifconfig lo:0 down
> echo 0 > /proc/sys/net/ipv4/conf/lo/arp_ignore
> echo 0 > /proc/sys/net/ipv4/conf/lo/arp_announce
> echo 0 > /proc/sys/net/ipv4/conf/all/arp_ignore
> echo 0 > /proc/sys/net/ipv4/conf/all/arp_announce
>
> ;;
> status)
> # Status of LVS-DR real server.
> islothere=`/sbin/ifconfig lo:0 | grep $VIP`
> isrothere=`netstat -rn | grep "lo:0" | grep $VIP`
> if [ ! "$islothere" -o ! "isrothere" ];then
> # Either the route or the lo:0 device
> # not found.
> echo "LVS-DR real server Stopped."
> else
> echo "LVS-DR Running."
> fi
> ;;
> *)
> # Invalid entry.
> echo "$0: Usage: $0 {start|status|stop}"
> exit 1
> ;;
> esac
>
> OK.
> The first time I make lynx 10.2.1.41, it works and I receive a
> "realserver1.html" confirmating that everything is alright. But the second
> time, when it's suposed to receive "realserver2.html" confirmation, I just
> get a
> Looking up 10.2.1.41
> Making HTTP connection to 10.2.1.41
> Alert!: Unable to connect to remote host.
> lynx: Can't access startfile http://10.2.1.41/
>
> Of course the next time it works find cause it's to work on a round robin
> basis.
> is it maybe because I'm trying to get the pages from 10.2.1.59 (the same
> subnet as director and realservers??
> How can I test if it's load balancing if I haven't got a switch to put the
> realservers and the directors on different net?
> Sure I'm asking a very easy (and stupid) question but I don't know how to
> follow.
> Sorry for my english (I'm spanish), and thanks in advance!
>
> Andrés.
>
> **NOTA DE CONFIDENCIALIDAD** Este correo electrónico, y en su caso los
> ficheros adjuntos, pueden contener información protegida para el uso
> exclusivo de su destinatario. Se prohíbe la distribución, reproducción o
> cualquier otro tipo de transmisión por parte de otra persona que no sea el
> destinatario. Si usted recibe por error este correo, se ruega comunicarlo al
> remitente y borrar el mensaje recibido.
> **CONFIDENTIALITY NOTICE** This email communication and any attachments may
> contain confidential and privileged information for the sole use of the
> designated recipient named above. Distribution, reproduction or any other use
> of this transmission by any party other than the intended recipient is
> prohibited. If you are not the intended recipient please contact the sender
> and delete all copies.
>
> _______________________________________________
> 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
--
|