LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] debugging ldirectord problem

To: Henrique Fernandes <sf.rique@xxxxxxxxx>, "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] debugging ldirectord problem
From: Ricardo Kleemann <ricardo@xxxxxxxxxxxxxxx>
Date: Sat, 05 Mar 2011 20:27:49 -0800
Hello Henrique,

The problem is very strange.

From the ldirectord server itself, I'm able to get to BOTH smtps as I
showed in the original post.

So I'll do what you suggested.

First, with BOTH servers enabled:

sysadmin@fw:~$ telnet 192.168.1.200 25
Trying 192.168.1.200...
Connected to 192.168.1.200.
Escape character is '^]'.
220 email1.americasnet.com ESMTP

Second attempt, still with BOTH enabled:

sysadmin@fw:~$ telnet 192.168.1.200 25
Trying 192.168.1.200...
telnet: Unable to connect to remote host: Connection timed out

I tried a third time, got the same result as above. Then I tried a
fourth time, and was successful, on server email1 as above.

Now, I turn off the email1 server.

The result is the connection timeout

sysadmin@fw:~$ telnet 192.168.1.200 25
Trying 192.168.1.200...
telnet: Unable to connect to remote host: Connection timed out

I tried it 4 times, with same result, connection timeout

Now I turn off the second server (the one that doesn't seem to work
from ldirectord). The result is that I get an immediate connection
refused (rather than a timeout). That would make sense because there
are no real servers at all available.

As soon as I bring up the second server again (the one that doesn't
work with ldirectord) then the situation goes back to the timeout.

But, as I said before, if I manually telnet to it, it works fine.
It's only through ldirectord that it doesn't work.

Ricardo

At Saturday, 03-05-2011 on 18:36 "Henrique Fernandes"  wrote:

[]'sf.rique 

On Sat, Mar 5, 2011 at 10:16 PM, Ricardo Kleemann  wrote:

 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 [1]
        real=192.168.1.102:25 [2] masq
        real=192.168.1.204:25 [3] 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.

What do you do to take it out of equation ?  

What do you mean it never flows to the other server ?

Try like this:

From another server do it about 5 times and post the results!

$ telnet 192.168.1.200 25

After it, go into the first server and shut down mail server and see
if ldirector set it weigh to 0 if it does, it should only goes to next
server.

So for tests porpuses:
Shut down one mail sever and repet the test above.
WITHOUT restarting it, shutdown the other mail server, and repeat
thet test
Now you can turn one the firt server again and repeat the teste.

When you post here the results i might be able to help!

Any idea what could be wrong?

I did not understand pretty well what is wrong. Lets see if you got
my ideia and will test it well! 

Thanks
Ricardo

Good luck! 

_______________________________________________
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



Links:
------
[1] http://192.168.1.200:25
[2] http://192.168.1.102:25
[3] http://192.168.1.204:25

_______________________________________________
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>