Re: [lvs-users] Unable to load balance two tomcat servers

To: " users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] Unable to load balance two tomcat servers
From: Graeme Fowler <graeme@xxxxxxxxxxx>
Date: Sat, 14 Feb 2009 10:09:55 +0000
On Fri, 2009-02-13 at 16:30 -0800, Praveen Sooryanarayana wrote:
> ldirectord will use the same port for the real servers as defined for the
> virtual server when "gate" is used for the real servers.

Yup. That's how "gate" works.

> If I use "masq" for the real servers and have the following configuration,
> virtual=
>         fallback=
>         real= masq
>         real= masq
>         service=http
>         request="test.html"
>         receive="It works"
>         scheduler=rr
>         protocol=tcp
>         checktype=negotiate
> the requests get load balanced, but the TCP response has the source as real
> ip with port 8080 and the browser does not accept this response.

That indicates you haven't set the LVS up correctly. In a NAT ("masq")
setting, all return traffic from the realservers has to return via the
director so the NAT can be undone.

The easiest way to do this is to set the default gateway on the
realservers to point at the appropriate corresponding interface on the

This is fundamental, and well documented.


Please read the documentation before posting - it's available at: mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to

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