LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] debugging ldirectord problem

To: "lvs-users@xxxxxxxxxxxxxxxxxxxxxx" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [lvs-users] debugging ldirectord problem
From: Ricardo Kleemann <ricardo@xxxxxxxxxxxxxxx>
Date: Sat, 05 Mar 2011 17:16:23 -0800
Hi,

I'm trying to make ldirectord work for smtp and having some issues.

Basically I have 2 servers which themselves run virtualization (via
virtualbox).

Server1 has a virtualized server running smtp (lets call it smtp1 ->
192.168.1.204)
Server2 also has a virtualized server running smtp (lets call it
smtp2 -> 192.168.1.102)

ldirectord is running on Server1, ip 192.168.1.200

So I have in my config:

virtual=192.168.1.200:25
        real=192.168.1.102:25 masq
        real=192.168.1.204:25 masq
        service=smtp
        scheduler=wlc
        protocol=tcp
        #persistent=600
#       #netmask=255.255.255.255
        checktype=connect

I have no problems getting to smtp1 and smtp2 from the ldirectord
server:

$ telnet 192.168.1.204 25
Trying 192.168.1.204...
Connected to 192.168.1.204.
Escape character is '^]'.
220 email1 ESMTP

$ telnet 192.168.1.102 25
Trying 192.168.1.102...
Connected to 192.168.1.102.
Escape character is '^]'.
220 maillgw2 ESMTP MailCleaner (Community Edition 2010 beta 3) Sat,
05 Mar 2011 17:08:46 -0800

However, ldirectord only flows connections to the virtual server that
is local to itself (smtp1). No matter what I do, it will never use the
other smtp server (smtp2).

ldirectord considers both as valid and adds weight to them

sysadmin@vbox:/etc/bind/master$ sudo ipvsadm -L
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight
ActiveConn InActConn
TCP  vbox:smtp wlc
  -> email1:smtp                  Masq   
1      1          1
  -> mailgw2:smtp                 Masq   
1      0          1

But again, never routes to the other smtp.

So I tried removing the smtp1 from the equation, and then even though
ipvsadm reports it is available for forwarding, that never works. I
never get the connection. If smtp1 is in the forwarding list, then it
works.

Any idea what could be wrong?

Thanks
Ricardo

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
<Prev in Thread] Current Thread [Next in Thread>