[Linux-HA] RE: Help with setting up LVS

Callahan, Tom CallahanT at tessco.com
Wed Dec 6 07:28:42 MST 2006


My configuration is as follows:

--------------HA.CF------------------
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility     local0
keepalive 500ms
deadtime 10
warntime 5
initdead 30
mcast eth0 225.0.0.1 694 1 0
auto_failback off
node    lvs_n1.tessco.com
node    lvs_n2.tessco.com
respawn hacluster /usr/lib/heartbeat/ipfail

apiauth ipfail gid=haclient uid=hacluster
-------------END HA.CF-------------------

-------------HARESOURCES-----------------
lvs_n1.tessco.com       \
        ldirectord::ldirectord.cf \
        LVSSyncDaemonSwap::master \
        IPaddr2::10.20.141.240/24/eth0/10.20.141.255
------------END HARESOURCES--------------

------------LDIRECTORD.CF----------------
checktimeout=10
checkinterval=2
autoreload=no
logfile="/var/log/ldirectord.log"
logfile="local0"
quiescent=yes

virtual=1
        real=10.20.141.43:0 masq
        real=10.20.141.44:0 masq
        scheduler=rr
        persistent=600
        checktype=connect
----------END LDIRECTORD.CF--------------

In my iptables configuration, I have the following:
iptables -t mangle -A PREROUTING -d 10.20.141.240 -p tcp -m tcp -j MARK
--set-mark 1

When I start everything up, I can connect to port 1400 on the director, but
the director does not pass it through to the real-servers. The connection
just sits there and timesout eventually.

Thanks,
Tom Callahan

-----Original Message-----
From: Horms [mailto:horms at verge.net.au] 
Sent: Wednesday, December 06, 2006 2:53 AM
To: Callahan, Tom
Cc: ultramonkey-users at ultramonkey.org; linux-ha at lists.linux-ha.org
Subject: Re: Help with setting up LVS

On Tue, Dec 05, 2006 at 10:24:05AM -0500, Callahan, Tom wrote:
> I am trying to setup an HA and Load Balanced configuration for a Java
> application server. I have two real-servers ( 10.20.141.43 and
10.20.141.44)
> named glcdl385g and glcdl385f respectively, that are running JBOSS
> application server.
> 
>  
> 
> I have two director nodes (10.20.141.51 and 10.20.141.52) named lvs_n1 and
> lvs_n2 respectively.
> 
>  
> 
> The application connects initially on port 1400 (HA-JNDI), but then
bounces
> around ports to perform it's transactions.
> 
>  
> 
> How do I setup LVS so that it can load-balance all connections this way? I
> have read up some information on fwmark, and done an initial setup
according
> to the documents on Ultramonkey, but it is not working.

fwmark sounds like the way to go to me. Could you give some more
information on what you have set up, and what isn't working.

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/



More information about the Linux-HA mailing list