LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

ldirectord https timeout not working?

To: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: ldirectord https timeout not working?
From: "Scott Jones" <scott@xxxxxxxxxxxxxxxxxx>
Date: Wed, 29 May 2002 01:20:34 -0700
Hello,

I've been using ldirectord to do real server monitoring on my lvs cluster
for more than a year now, but just now ran into a problem.  One of our
realservers had a problem that made the test page begin but never actually
respond (it was unable to obtain a database connection from our pool).

Unfortunately, while ldirectord did exactly what I expected for the http
service and immediately removed the server, it did not remove the https
service from that server and people continued to be sent to that machine.

Here is a discussion on the same topic from late last year, that didn't seem
to come to any conclusions.
http://marc.theaimsgroup.com/?l=linux-virtual-server&m=100309935206514&w=2

Looking at the source code for ldirectord (see below), I do not see any
reference to the negotiatetimeout variable (which is used in check_http).  I
am far from a perl expert, but I dug up the documentation for the Net:SSLeay
perl module at http://symlabs.com/Net_SSLeay/Net_SSLeay.txt , and didn't see
any kind of mention of a timeout...  is this a limitation of the perl
libraries?

Any thoughts on ways to solve this problem?

Thanks!

-Scott


sub check_https
{
        my ($v, $r) = @_;
        use Net::SSLeay;
        $Net::SSLeay::trace = 0;
        $uri = $$v{request};
        my ($page, $result, %headers) = Net::SSLeay::get_https($$r{server},
$$r{port}, $uri);
        my $recstr = $$r{receive};
        if ($result =~ /ERROR/) {
                service_set($v, $r, "down");
                return 0;
        }
        if ( !($recstr =~ /.+/) || $page =~ /$recstr/ ) {
                service_set($v, $r, "up");
                return 1;
        }
        service_set($v, $r, "down");
        return 0;
}

On Sun, Oct 14, 2001 at 12:06:45PM -0500, Kelly Corbin wrote:
> In my LVS cluster I think I may have found a bug in ldirectord.
> It seems that if a web server opens a TCP/IP connection, but does not
> respond on that connection, ldirectord hangs waiting for a response and
> never continues checking the other servers.  I had checking set to
> 'negotiate' to detect that exact problem, but it ldirectord just sits
> there.  A stack trace on ldirectord just says:
>
> read 3)
>
> and sits there.  I'm not sure if it's just for http or https connections
> or both.  I'll have to investigate more, but I think it's just https
> connections.

The read should eventually time out and ldirectord should
be able to procede. Please let me know if this is not the case.

--
Horms



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