Hi,

On Mon, May 25, 2009 at 12:22:25PM +0530, Sanjeev Kumar wrote:
> I need to debug why Http-healthCheck respoanse is received by proxy-machine,
> but HAproxy says no.
> Event log just displays single message:  "server down".
> 
> How to enable detailed TCP logging in HAproxy?

haproxy supports several log formats and levels, but it does not log
health checks. However, your mistake is quite easy to spot below :

>   option httpchk HEAD /check.tst HTPP/1.0

See ? "HTPP" instead of "HTTP", so most likely your server is responding
with "400 Bad request", which you should see in its logs.

Hmm, I also see something wrong with your IP address :

>   server servA 192.168.2:9123  check

This one is normally equal to 192.168.0.2, which might not be what you
want. You should fix it too.

When you have problems with health checks, it's always a good idea to
try them by hand :

# telnet 192.168.2.1 9123
HEAD /check.tst HTPP/1.0

(and wait for the server response)

Last, you forgot to set client and server timeouts, which is a bad thing,
because you will rely on the system to abort stuck connections and depending
on the configuration, it may take between several hours to several days, and
sometimes eternity. So please add "timeout client" and "timeout server".

Regards,
Willy


Reply via email to