I have haproxy sitting in front of an apache ssl proxy.  I set up
haproxy to listen on 443.  Apache listens on 444 for https, and 445
for http.  Haproxy passes requests to 444, and runs health checks
against 445.  That should allow me to add of remove a file at a known
url behind 445 to control whether apache is included or removed from
load balancing.  In practice, this isn't working.

My apache config stanza looks like:

listen secure :443
    mode tcp
    option httpchk /check
    server apache1 ita1bbx30:444 check port 445 inter 2000 rise 1 fall 1
    server apache2 ita1bbx33:444 check port 445 inter 2000 rise 1 fall 1

I'm running haproxy 1.4.8.

To start with, everything is running.  I use curl and can see that the
:445/check url is returning a 200.  Next I remove the htdocs/check
file.  I use curl and can see that the :445/check url is returning a
404.  However, the haproxy stats page continues to say that the apache
process is up.  I continue monitoring this for minutes, and it
continues to be the case.  When I actually turn off apache, haproxy
finally notices and says this in the logs:

Jul  1 13:29:28 localhost haproxy[2388]: Server secure/apache1 is
DOWN, reason: Layer4 connection problem, info: "Connection refused",
check duration: 0ms.

So it seems like my health check just isn't being used at all.  Any
ideas what could be going on here?

-Matt

Reply via email to