LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Fallback to apache on director with ldirectord

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Fallback to apache on director with ldirectord
From: Guy Waugh <gwaugh@xxxxxxxxxx>
Date: Mon, 24 Oct 2005 14:02:04 +1000
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.

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