[Linux-HA] ldirectord 1.99 fails to recognize HTTPS server being shut down

Horms horms at verge.net.au
Mon Jul 4 20:14:58 MDT 2005


On Mon, Jul 04, 2005 at 11:56:29PM +0200, Volker Dormeyer wrote:
> Hi all,
> 
>  * On Mon, 04 Jul 2005 23:19:23 +0200,
>  * Bernhard Erdmann <be at berdmann.de> wrote:
> 
>  >> Thanks for pointing this out, its clearly broken.
>  >> Can you see if the following patch helps your cause?
> 
>  > Hi, this patch disables every real server, no matter if it's alive or not.
> 
> I believe this has something to do with the httpmethod patch I sent in
> some time ago. Do you use httpmethod=HEAD?
> 
> If so, this patch might help you:
> 
> --- ldirectord.orig     2005-03-25 23:49:17.096482151 +0100
> +++ ldirectord  2005-03-26 00:02:13.183817291 +0100
> @@ -1858,7 +1858,7 @@
>                 $port=(defined $$v{checkport}?$$v{checkport}:$$r{port})
>         }
>         my $virtualhost = (defined $$v{virtualhost} ? $$v{virtualhost} : $host);
> -       my ($page, $errors, $cert, $head, $body, $response, $result);
> +       my ($page, $errors, $cert, $head, $body, $response);
>         my $msg = "$$v{httpmethod}" . " $uri HTTP/1.0" . $CRLF
>                 . "Host: " . $virtualhost . $CRLF
>                 . "Accept: */*" . $CRLF . $CRLF;
> @@ -1879,10 +1879,10 @@
>                 ($response, $head) = split /\s?\n/, $head, 2;
>                 &ld_debug(2, "Result: $response");
>                 my $recstr = $$r{receive};
> -               if($result =~ /error/i ||
> +               if( !($response =~ /20[0-9]/) ||
>                                 ($recstr =~ /.+/ && !($body =~ /$recstr/))) {
>                         alarm(0);
> -                       die("$result");
> +                       die("$response");
>                 }
>         };
> 
> It parses the return code. If HTTP return code is 20x (OK) or something
> like that, it succeeds. But it fails if you get a redirect return code
> (i. e. greater than 300). It works for me.
> 
> @Horms: Maybe you can remember, some time ago I reported this problem
> with the httpmethod patch I sent and the HTTPS check. Maybe the report
> was lost within numbers of emails you receive every day. Sure, this
> patch is not the best way to do this. That's why I replaced Net::SSLeay
> by LWP (shouldn't have a memory leak anymore) in another patch.

Could you please rediff your change against CVS, and send it here
again? Appologies, but I am not sure what happened to my last copy. But
I am certainly very enthusiastic of anything that leads to not using
Net::SSLeay.

-- 
Horms



More information about the Linux-HA mailing list