LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Fallback to apache on director with ldirectord

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Fallback to apache on director with ldirectord
From: Guy Waugh <gwaugh@xxxxxxxxxx>
Date: Tue, 25 Oct 2005 10:00:42 +1000
Hello again,

Further investigation of this problem...

I saw a few posts concerning expire_nodest_conn, so I set that to 1. 'ipvsadm -Lcn' shows that connections aren't being expired, however.

When the service had fallen back to 127.0.0.1:80 and I had waited for all connections to the VIP:80 to expire, and tried to connect to the VIP:80 again, it still didn't work, and this was the output of 'ipvsadm -Lcn|grep 10.0.0.1:80':

[root@lvs1 gwaugh]# ipvsadm -Lcn|grep 10.0.0.1:80
TCP 09:53  NONE        10.133.27.14:0     10.0.0.1:80     127.0.0.1:80
TCP 00:53  SYN_RECV    10.133.27.14:39133 10.0.0.1:80     127.0.0.1:80

(My workstation is 10.133.27.14.)

Could it be that ldirectord is not honouring expire_nodest_conn?

FYI, I did a 'service ldirectord restart' after 'echo 1 > /proc/sys/net/ipv4/vs/expire_nodest_conn'.

Cheers,
Guy.



Guy Waugh wrote:
Hi folks,

I'm trying to set up a simple fallback server on the LVS director for a port 80 apache service, such that if all the real servers for the apache service are down, the service will fall back to apache on the director. We run an LVS-NAT system with two real servers and about 30 active apache virtual hosts.

I have this in my ldirectord.cf file (IPs changed to protect the innocent):

virtual=10.0.0.1:80
        real=192.168.1.1:80 masq
    real=192.168.1.2:80 masq
        fallback=127.0.0.1:80 masq
        quiescent=no
        checktype=connect
        service=none
        scheduler=wlc
        persistent=600
        protocol=tcp

When apache on the real servers is shut down, 'ipvsadm -L' shows that the service has fallen back to 127.0.0.1:80 (as do the ldirectord logs), but I can't connect to the service - it says 'connection refused'. I'm trying to connect from my workstation, and the connection works fine when apache on the real servers is up and running.

When the service is in fallback mode, I can telnet to port 80 on 127.0.0.1 from the director, and a 'GET / HTTP/1.1' with a correct HTTP Host: header works, so apache on the director is answering requests to 127.0.0.1 port 80. The problem seems to be that the LVS code isn't handing the connection from my workstation off to 127.0.0.1:80 - it doesn't in fact seem to be listening to connections at all.

Anyone have any ideas on what I could try?

PS Director is RHEL3, Ultramonkey 3.

Thanks,
Guy.
_______________________________________________
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



--
Guy Waugh
Unix System Administrator
IT&TS, Southern Cross University
Lismore, NSW, Australia
Email: gwaugh@xxxxxxxxxx
Ph.: +61 2 6620 3196
Fax: +61 2 6620 3033

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