LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Ldirectord in standalone mode causes problem

To: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Ldirectord in standalone mode causes problem
From: "Mark" <msalists@xxxxxxx>
Date: Thu, 15 Sep 2005 10:15:16 -0700
Hello everybody,

I am trying to run the ultramonkey release of ldirectord as a standalone 
process on a Fedora Core 1 box to do load-balancing between
http servers.
I got everything set up but am having problems getting the response from the 
pool server.
The same ldirectord server is running other instances of ldirectord in 
connection with heartbeat (ultramonkey) and working fine
there, so kernel and other basic things on te box should generally not cause 
any problems for ldirectord...

For my below tests, heartbeat and the connected ldirectord processes are shut 
down. The only ldirectord instance running is the
standalone-one that has the problem. Also, the tests are ran with iptables on 
all nodes deactivated, so this should not be a
firewall issue.

My basic test setup is just a two-node setup:

LVD1 -----> webserv1



LVD1 has several interfaces, one of them is "eth0:lb1" listening to 
192.168.101.24.
One of webserv1's interfaces is 192.168.101.64

The full interface lists and ldirectord configuration are attached at the end.
I noticed a really high traffic volume and error rate compared to the other 
interfaces and am not sure where that would come from,
unless it is from the periodic negotiation checks that ldirectord is running to 
find out which nodes are active.

If everything was working as planned, I should be able to do "curl  
<http://192.168.101.24> http://192.168.101.24"; on webserv1 and
get the welcome page served by webserv1, running a loop over LVD1's ldirectord 
instance. At least this is what I want, but I don't
seem to be able to get this working:


When I try "curl  <http://192.168.101.24> http://192.168.101.24"; on webserv1, I 
get a timeout and iptraf on webserv1 shows:
|+192.168.101.64:53532                                               =       2  
           120    S---       eth0      |
|+192.168.101.24:80                                                  =       0  
             0    ----       eth0      |
|+192.168.101.64:53532                                               =       2  
           120    S---       eth0      |
|+192.168.101.64:80                                                  =       0  
             0    ----       eth0      |

So it seems like LVD1 does the forwarding to webserv1 correctly, but webserv1 
does not accept the connection (Only an "S" but no "A"
in the status flags).
"curl  <http://192.168.101.64> http://192.168.101.64"; does return the regular 
result however, no matter if I call this on webserv1
or another node in the subnet, so apache is running and working fine on 
webserv1...

If I try to to "curl  <http://192.168.101.24> http://192.168.101.24"; on lvd1 
directly, I get a 111 socket error if httpd on LVD1 is
NOT running and a response coming from LVD1 if httpd IS running. This is odd 
too, since I would have expected ldirectord to pick up
the traffic and forward it out... however, iptraf on LVD1 shows that the 
traffic is going through the local interface ("lo") and not
the real eth0 interface, which may be an explanation for this part...



my ldirectord configuration is this:
----------------------------------------------
checktimeout=5
checkinterval=20
fallback=127.0.0.1:80
autoreload=yes
quiescent=no

# IP for all webservers
virtual=192.168.101.24:80
        real=192.168.101.64:80 masq
#       real=192.168.102.64:80 masq
#       real=192.168.101.65:80 masq
#       real=192.168.102.65:80 masq
        service=http
        request="pooling_status.html"
        receive="pooling ok"
        scheduler=rr
        protocol=tcp
#virtual=192.168.102.24:80
#       real=192.168.101.64:80 masq
#       real=192.168.102.64:80 masq
#       real=192.168.101.65:80 masq
#       real=192.168.102.65:80 masq
#       service=http
#       request="pooling_status.html"
#       receive="pooling ok"
#       scheduler=rr
#       protocol=tcp

----------------------------------------------
I commented out all interfaces except one to make debugging with iptraf easier.

The log looks like ldirectord is working fine:
[Thu Sep 15 09:44:24 2005|ldirectord.httpd.cf] Starting Linux Director 
v1.77.2.5 as daemon
[Thu Sep 15 09:44:24 2005|ldirectord.httpd.cf] Added virtual server: 
192.168.101.24:80
[Thu Sep 15 09:44:24 2005|ldirectord.httpd.cf] Added fallback server: 
127.0.0.1:80 ( x 192.168.101.24:80) (Weight set to 1)
[Thu Sep 15 09:44:25 2005|ldirectord.httpd.cf] Added real server: 
192.168.101.64:80 ( x 192.168.101.24:80) (Weight set to 1)
[Thu Sep 15 09:44:25 2005|ldirectord.httpd.cf] Deleted fallback server: 
127.0.0.1:80 ( x 192.168.101.24:80)



Interfaces of LVD1
eth0      Link encap:Ethernet  HWaddr 00:50:8B:8F:BA:AC
          inet addr:192.168.101.20  Bcast:192.168.101.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20955 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29582 errors:0 dropped:0 overruns:0 carrier:0
          collisions:1536 txqueuelen:1000
          RX bytes:2417345 (2.3 Mb)  TX bytes:4827852 (4.6 Mb)
          Interrupt:5 Base address:0x3000

eth0:lb1  Link encap:Ethernet  HWaddr 00:50:8B:8F:BA:AC
          inet addr:192.168.101.24  Bcast:192.168.101.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:809578 errors:0 dropped:0 overruns:0 frame:0
          TX packets:732558 errors:2762 dropped:0 overruns:0 carrier:2766
          collisions:70061 txqueuelen:1000
          RX bytes:1015654548 (968.6 Mb)  TX bytes:57431932 (54.7 Mb)
          Interrupt:5 Base address:0x3000

eth1      Link encap:Ethernet  HWaddr 00:00:F8:1A:EB:F0
          inet addr:192.168.102.20  Bcast:192.168.102.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15234 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13541 errors:3 dropped:0 overruns:0 carrier:2
          collisions:0 txqueuelen:1000
          RX bytes:2422841 (2.3 Mb)  TX bytes:2479321 (2.3 Mb)
          Interrupt:5 Base address:0x7c80

eth1:lb1  Link encap:Ethernet  HWaddr 00:00:F8:1A:EB:F0
          inet addr:192.168.102.24  Bcast:192.168.102.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:809579 errors:0 dropped:0 overruns:0 frame:0
          TX packets:732559 errors:2762 dropped:0 overruns:0 carrier:2766
          collisions:70063 txqueuelen:1000
          RX bytes:1015656062 (968.6 Mb)  TX bytes:57431998 (54.7 Mb)
          Interrupt:5 Base address:0x7c80

eth2      Link encap:Ethernet  HWaddr 00:00:F8:1A:EB:F1
          <public IP>  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:809580 errors:0 dropped:0 overruns:0 frame:0
          TX packets:732561 errors:2762 dropped:0 overruns:0 carrier:2766
          collisions:70063 txqueuelen:1000
          RX bytes:1015657576 (968.6 Mb)  TX bytes:57433590 (54.7 Mb)
          Interrupt:10 Base address:0x6c00

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:418 errors:0 dropped:0 overruns:0 frame:0
          TX packets:418 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:105838 (103.3 Kb)  TX bytes:105838 (103.3 Kb)



webserv1 is listening to
eth0      Link encap:Ethernet  HWaddr 00:0F:1F:F7:A2:9A
          inet addr:192.168.101.64  Bcast:192.168.101.255  Mask:255.255.255.0
          inet6 addr: fe80::20f:1fff:fef7:a29a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15263681 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7534916 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2125453772 (1.9 GiB)  TX bytes:1049040739 (1000.4 MiB)
          Base address:0xece0 Memory:fe1e0000-fe200000

eth0:1    Link encap:Ethernet  HWaddr 00:0F:1F:F7:A2:9A
          inet addr:192.168.101.128  Bcast:192.168.101.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Base address:0xece0 Memory:fe1e0000-fe200000

eth1      Link encap:Ethernet  HWaddr 00:0F:1F:F7:A2:9B
          inet addr:192.168.102.64  Bcast:192.168.102.255  Mask:255.255.255.0
          inet6 addr: fe80::20f:1fff:fef7:a29b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:16341326 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11375497 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2440254563 (2.2 GiB)  TX bytes:1480973231 (1.3 GiB)
          Base address:0xdcc0 Memory:fdee0000-fdf00000

eth1:1    Link encap:Ethernet  HWaddr 00:0F:1F:F7:A2:9B
          inet addr:192.168.102.128  Bcast:192.168.102.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Base address:0xdcc0 Memory:fdee0000-fdf00000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:28366 errors:0 dropped:0 overruns:0 frame:0
          TX packets:28366 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3854025 (3.6 MiB)  TX bytes:3854025 (3.6 MiB)





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