LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Problem with masq option for LVS - help very much appreciated!

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Problem with masq option for LVS - help very much appreciated!
From: Roberto Nibali <ratz@xxxxxxxxxxxx>
Date: Thu, 15 Feb 2007 00:51:15 +0100
here is something that drives me crazy - I can't get my (first) IPVS Administration to work with that config.

We'll get there.

I simply want to map port 82 on that virtual server to port 81 on the real servers. BUt all connections on port 82 simple time out. The real server works fine with direct access.

...

checktimeout=10
checkinterval=2
autoreload=yes
logfile="/var/log/ldirector"
quiescent=yes
virtual=80.237.183.170:82
        fallback=67.19.109.2:81 masq 1000
        real=80.237.155.99:81 masq 1000
         service=http
         request="ldirector.html"

Should this be /ldirector.html instead of ldirector.html?

         receive="Test Page"
         protocol=tcp
         checktype=negotiate
         persistent=1800

Comparing to the ipvsadm -ln output below, you're either not telling the whole truth or did a copy'n'paste error :). Where does the 80.237.155.99:82 come from?

ipvsadm -ln

shows this:

Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  80.237.183.170:82 wrr persistent 1800
  -> 80.237.155.99:81             Masq    1000   0          0
  -> 80.237.155.99:82             Masq    0      0          0

Connections should at least go to 80.237.155.99:81. The other RS is quiesced (weight == 0). But where did this 80.237.155.99:82 RS come from?

The debugging shows this:

 /usr/sbin/ldirectord -d /etc/heartbeat/ldirectord.cf start

This is not consistent with the configuration of yours above.

EBUG2: Starting Linux Director v1.77.2.6 with pid: 13868
Starting Linux Director v1.77.2.6 with pid: 13868
DEBUG2: Running system(/sbin/ipvsadm -A -t 80.237.183.170:82 -s wrr -p 1800 )
Running system(/sbin/ipvsadm -A -t 80.237.183.170:82 -s wrr -p 1800 )
DEBUG2: Added virtual server: 80.237.183.170:82
Added virtual server: 80.237.183.170:82
DEBUG2: Running system(/sbin/ipvsadm -a -t 80.237.183.170:82 -r 67.19.109.2:81 -m -w 1) Running system(/sbin/ipvsadm -a -t 80.237.183.170:82 -r 67.19.109.2:81 -m -w 1) DEBUG2: Added fallback server: 67.19.109.2:81 ( x 80.237.183.170:82) (Weight set to 1) Added fallback server: 67.19.109.2:81 ( x 80.237.183.170:82) (Weight set to 1)

Hmm, seems to be a chicken an egg situation when first starting ldirectord and not all services are up. The fallback server is added, although a valid RS has been assigned to the service.

DEBUG2: Running system(/sbin/ipvsadm -a -t 80.237.183.170:82 -r 80.237.155.99:82 -m -w 0) Running system(/sbin/ipvsadm -a -t 80.237.183.170:82 -r 80.237.155.99:82 -m -w 0) DEBUG2: Quiescent real server: 80.237.155.99:82 mapped from 80.237.155.99:81 ( x 80.237.183.170:82) (Weight set to 0) Quiescent real server: 80.237.155.99:82 mapped from 80.237.155.99:81 ( x 80.237.183.170:82) (Weight set to 0)

Regarding this action the above fallback server entry makes sense. However, it's totally unclear to me, as to why the RS is quiesced. Are you 100% sure, that your ipvsadm -Ln actually shows the above posted output? And did you really post the correct and full configuration?

Can you report back what running the following "commands" from the director outputs for you, please:

# telnet 80.237.183.170 82
> GET /ldirectord.html HTTP/1.0 \n\n

# telnet 80.237.183.170 82
> GET ldirectord.html HTTP/1.0 \n\n

Best regards,
Roberto Nibali, ratz
--
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc

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