On Saturday 13 March 2010, Willy Tarreau wrote: > On Sat, Mar 13, 2010 at 02:50:32PM +0000, Nick Chalk wrote: > > > With 1.4.1 WITH patch applied: > > > - all 3 lines disabled: system works (serves content, no problem, but > > > no check) > > > - only 1. line enabled: ERROR, haproxy tells all hosts are down (when > > > they are not) > > > - only 2. line enabled: ERROR, haproxy tells all hosts are down (when > > > they are not) > > > - 2. and 3. line or 1. and 3. line enabled: ERROR as above. > > > > On the ToDo list is better logging of what httpchk is doing - along > > with working out all the options to the original patch. > > > > As a quick test, try adding the following options in place of the > > commented-out lines above: > > > > option httpchk GET /check.php HTTP/1.0 > > http-check expect rstring all_is_ok > > > > The 'string' test should work, but it's had less testing than > > 'rstring'. I've not tried the HEAD method; I can't see it working with > > 'expect'. > > Ah indeed, I did not notice the method was HEAD. Obviously > it will not get any contents, explaining the issue. However, > Anze indicated that as soon as the patch was included, option > "httpchk" stopped working. I suspect that the status code > check is always enabled and does not match what is implicitly > configured (eg: 0). I may be wrong, that's pure guess.
Nick, the above configuration doesn't work. Actually, none of these work: ----- option httpchk GET /check.php HTTP/1.0 http-check expect rstring all_is_ok ----- option httpchk GET /check.php HTTP/1.0 http-check expect string all_is_ok ----- option httpchk GET /check.php HTTP/1.0 http-check expect rstring all_is_ok ----- option httpchk GET /check.php HTTP/1.0 ----- option httpchk HEAD /check.php HTTP/1.0 ----- I think it is time for that logging feature... ;-D I will try to trace where the check fails and why. I guess it is easiest for me to do it because i can replicate the error anytime. If you have some guidelines where in the code to add printf()-s however, I'd appreciate it. Or I'll just take a look at what the patch changes... I love open source software. :) Thanks, Anze