Re: HAproxy not accepting http health check response

From: Sanjeev Kumar <replyskumar#gmail.com>
Date: Mon, 25 May 2009 15:45:56 -0400


Thanks for your analysis. (HTPP was a typo in my mail.) My server application is a new DB-app and not web-server. It just mimics the web-response to HEAD cmd for HAproxy health-checks to succeed.
On received HEAD /check.txt , it send HTTP/1.0 200 OK. The ';' is statement terminator that I am temporarily forced to send due to application-syntax.
As you have poineted out, the DB-app send back correct health-chk response.

But, in syslog, the server is not marked as Up. It just says "proxy started".

I am sending my config file & strace log for new run of HAproxy. Any comments are welcome.

thanks,
-sanjeev

On Mon, May 25, 2009 at 11:24 AM, Benedikt Fraunhofer <fraunhof#traced.net>wrote:

> Ah, forgot to cc the list in my first reply, so sorry for the
> following fullquote.
>
>
> 2009/5/25 Benedikt Fraunhofer <fraunhof#traced.net>:
> > Hello *,
> >
> > 2009/5/25 Sanjeev Kumar <replyskumar#gmail.com>:
> >> My config file.
> > [...]
> >> option httpchk HEAD /check.tst HTPP/1.0
> >
> > do you really have "HTPP" there?
> >
> > can you paste the tcpdump or strace output?
> >
> > just my 2 cent.
> >
> > Beni.
> >
>
> ---
> 2009/5/25 Sanjeev Kumar <replyskumar#gmail.com>:
> > I have changed the DB-application on server is to respond to HTTP-HEAD
> cmd
> > with the response:
> >
> > HTTP/1.0 200 OK\r\n\r\n
>
> 3 things...
>
> 1) the EAGAIN is not really an error. It's the expected answer for a
> recv() call on a non-blocking-io handle
> which has no data available to read. It's more like a "please try
> again later"-hint.
> non-blocking-io-operation is requested with
> fcntl64(6, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
>
> 2) option httpchk HEAD /check.tst HTPP/1.0
> is somehow wrong. That was the first question in my first reply.
> It's "HTTP" not "HTPP" and you must have some other typo in there, as
> your strace output
> says:
> send(6, "HEAD /check.txt; HTTP/1.0\r\n\r\n", 29,
> MSG_DONTWAIT|MSG_NOSIGNAL) = 29
> .
> note the ";" after "check.txt", which is incorrect.
> Furthermore the filename you supplied in your config "check.tst" does not
> appear
> here. A correct http-request obeying the config you supplied would look
> like
> HEAD /check.tst HTTP/1.0\r\n\r\n
>
> 3) surprisingly your application nevertheless returns a
> HTTP/1.0 200 OK\r\n\r\n
> which looks fine, so you've got me stumped.
>
> Could you double check that you've no typos in your config? It's just
> that the requests
> seen in the strace output do not comply with the config you pasted.
>
> Please also note that you've "mode tcp" in there and you are
> requesting http-checks.
> This is ok and also noted in the docs, just make sure this is what you
> really want :)
>
> does haproxy say something about the servers going down in the logs?
> Which version are you using?
> Should you repeat your strace, please use something like "-s 8192" so we
> can
> see all messages (especially those sent to the log) and they're not
> chopped after 32 characters.
>
> Cheers
>
> Beni.
>

Received on 2009/05/25 21:45

This archive was generated by hypermail 2.2.0 : 2009/05/25 22:00 CEST