On Fri, Jul 18, 2008 at 03:00:03PM +0800, Simon Oxwell wrote:
> 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 that I've seen about the internet:
> # Global Directives
> real=10.50.48.11:7778 masq
> real=10.50.48.12:7778 masq
> 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 18.104.22.168:4437 22.214.171.124:80 127.0.0.1:80
> TCP 00:50 SYN_RECV 126.96.36.199:4457 188.8.131.52:80 127.0.0.1:80
> TCP 00:49 SYN_RECV 184.108.40.206:4447 220.127.116.11:80 127.0.0.1:80
> TCP 00:49 SYN_RECV 18.104.22.168:4441 22.214.171.124: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]
> 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
> 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?
Can you try setting apache to listen on 126.96.36.199:80?
The connections from end-users should have that as their source IP address
and port at the time that they are received by apache.