LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] Problem trying to get an (old) ultra-monkey example to work

To: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [lvs-users] Problem trying to get an (old) ultra-monkey example to work (LVS-DR)
From: "Jonas Akrouh Larsen" <jonas@xxxxxxxxxx>
Date: Sun, 22 Jul 2007 22:27:54 +0200
Hi all

 

I just signed up to the list since I have been having problems with getting 
LVS-DR to work for days now.

 

Let me start by describing my setup:

 

2 hardware servers on the same lan.

 

I want 2 directors and 2 real servers.

 

So I have 1 director and 1 real server on each hardware box.

 

This corresponds to the example at: 
http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html

 

When following that guide everything works just as they describe it, except for 
one step:

 

TCP  192.168.6.240:80 rr

  -> 192.168.6.4:80               Route   1      0          0         

  -> 192.168.6.5:80               Route   1      0          0         

 

Is how their ipvs table look like. Now if I look at my own table it looks like 
this:

 

TCP  192.168.100.35:80 rr

  -> 192.168.100.32:80            Local   1      0          0

  -> 192.168.100.31:80            Route   1      0          0

 

As you can see the realserver 192.168.100.32:80 is listed as Local. Which DO 
make sence since that realserver is local to the director im issuing the 
command on.

 

Now here comes the problem: If I try to connect to the service, it works 50% of 
the time. If it hits the Local realserver everything works, but the other 50% 
of the attemps it tries the other real server, and that just fails.

 

So it appears the director for some reason cant forward the packets to the 
other box. The same behavior occurs if I make the other director active. The 
local realserver works, the remote doesn't.

C:\Documents and Settings\me>telnet 192.168.100.35 25

Connecting To 192.168.100.35...Could not open connection to the host, on port 25

: Connect failed

 

That's how it looks if I try to telnet to the smtp port from a windows machine 
on the same lan. IF I try again I get the smtp banner of the realserver running 
on the same machine as the director.

 

When connections fails the InActConn increments 1. And when they work 
ActiveConn does the same.

 

tcp        0      0 0.0.0.0:23              0.0.0.0:*               LISTEN

tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN

 

As you can see ports should be open on all ip's.

 

I tried making the setup more simple by creating a simple telnet service with 
only 1 realserver, running on a remote box. That gives the same behavior, 
Connect failed. It just happens everytime since there is no local node. (I 
followed these steps: 

#setup servers for telnet, LVS-DR

director:/etc/lvs# /sbin/ipvsadm -A -t 192.168.100.35:23 -s rr

director:/etc/lvs# echo "adding service 23 to realserver 192.168.100.31 "

director:/etc/lvs# /sbin/ipvsadm -a -t 192.168.100.35:23 -R 192.168.100.31 -g 
-w 1

 

Taking from http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.LVS-DR.html

 

So basically that's my problem; That the routing part of LVS-DR doesn't appear 
to be working.

 

Now for some extended info on what I am running:

 

Both machines are identical virtual machines running on 2 different host 
machines on the same lan.

 

They are both installed as Debian etch with debian stock kernel 2.6.18-4-686

 

This is the content of the two /etc/network/interfaces:

 

auto lo

iface lo inet loopback

 

auto lo:0

iface lo:0 inet static

  address 192.168.100.35

  netmask 255.255.255.255

  pre-up sysctl -p > /dev/null

 

# The primary network interface

auto eth0

iface eth0 inet static

address 192.168.100.31

netmask 255.255.255.0

gateway 192.168.100.254

 

And the other server

 

auto lo

iface lo inet loopback

 

auto lo:0

iface lo:0 inet static

  address 192.168.100.35

  netmask 255.255.255.255

  pre-up sysctl -p > /dev/null

 

# The primary network interface

auto eth0

iface eth0 inet static

address 192.168.100.32

netmask 255.255.255.0

gateway 192.168.100.254

 

The /etc/sysctl.conf file is also identical on both machines. These are the 
settings changed in there:

 

et.ipv4.conf.default.forwarding = 1

net.ipv4.ip_forward = 1

net.ipv4.conf.all.arp_ignore = 1

net.ipv4.conf.eth0.arp_ignore = 1

net.ipv4.conf.all.arp_announce = 2

net.ipv4.conf.eth0.arp_announce = 2

 

I am running ldirectord version 2.0.7-2 but I don't think this is related to 
ldirector.

I am running heartbeat version 2.0.7-2 but I don't think this is related to 
heartbeat

 

All software / kernels /modules are debian stock installs, so nothing have been 
compiled from tarballs.

 

The above is all the information I could imagine being helpful in debugging the 
problem, if I left out something just let me know.

 

Med venlig hilsen / Best regards

 

Jonas Akrouh Larsen

 

TechBiz ApS

Laplandsgade 4, 2. sal

2300 København S

 

Office: 7020 0979

Direct: 33369974

Fax:    7020 0978

Mobile: 51201096

Web: www.techbiz.dk <http://www.techbiz.dk/> 

 


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