LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] Fallback directive in ldirectord - what does it actually do?

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] Fallback directive in ldirectord - what does it actually do?
From: Simon Oxwell <s.oxwell@xxxxxxxxxxxxxx>
Date: Fri, 18 Jul 2008 15:00:03 +0800
Hi,

I'm trying to set up a fallback directive in ldirectord for a service 
that I'm using LVS-NAT to load balance to.

My setup closely follows the examples[1] that I've seen about the internet:

ldirectord.cf:

# Global Directives
checktimeout=3
checkinterval=5
fallback=127.0.0.1:80
autoreload=yes
logfile="/var/log/ldirectord.log"
quiescent=yes

virtual=134.115.4.218:80
         real=10.50.48.11:7778 masq
         real=10.50.48.12:7778 masq
         fallback=127.0.0.1:80
         service=http
         request="/index.html"
         receive="Welcome"
         virtualhost=my.murdoch.edu.au
         scheduler=lc
         persistent=600
         #netmask=255.255.255.255
         protocol=tcp

when the realservers are down, ipvsadm gives me this:

IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
   -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  my.murdoch.edu.au:www lc persistent 600
   -> localhost.localdomain:www    Local   1      0          0

and when I try to connect, ipvsadm -Lcn give me:

IPVS connection entries
pro expire state       source             virtual            destination
TCP 00:48  SYN_RECV    134.115.82.191:4437 134.115.4.218:80   127.0.0.1:80
TCP 00:50  SYN_RECV    134.115.82.191:4457 134.115.4.218:80   127.0.0.1:80
TCP 00:49  SYN_RECV    134.115.82.191:4447 134.115.4.218:80   127.0.0.1:80
TCP 00:49  SYN_RECV    134.115.82.191:4441 134.115.4.218:80   127.0.0.1:80

And I have an apache instance listening on 127.0.0.0:80.

Trouble is that the connection doesn't actually appear work - I get a 
connection error.

Digging a little deeper, it seems that all I get is the client 
workstation sends a SYN to port 80 on the VIP, and gets returned a RST/ACK.

I've seen a response in the mail list archives from a similar problem 
that suggests that I have my apache server listen on *:80 instead, but 
surely can't be right, because that would be an actual service listening 
on the port, rather than a redirection by ipvs?

(the ldirectord man page tells me it could a redirection to anywhere:
        fallback = ip_address|hostname[:portnumber|sercvicename]
        [gate|masq|ipip]

        the server onto which a webservice is redirected if all
        real servers are down. Typically this would be 127.0.0.1
        with an emergency page.

        This directive may also appear within a virtual server, in
        which case it will overide the global fallback server, if
        set.)


So, what is it that I've got misconfigured? Or is it a case of not 
understanding what it is that the fallback directive actually does in 
this case?


Simon

other info: debian etch, kernel 2.6.18-6, ldirectord  1.2.5)



[1] eg:
http://www.ultramonkey.org/3/topologies/config/lb/non-fwmark/linux-director/ldirectord.cf

-- 
o Simon Oxwell -- Database & Systems Administrator --- IT Services o
| s.oxwell@xxxxxxxxxxxxxx                 Science & Computing 1.37 |
| Phone: +61 8 9360 7335                        Murdoch University |
o-----o  "The lesson here is that dreams inevitably lead to  o-----o
           hideous implosions" - Miss Bitters, 'Invader Zim'


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