Httpchk while in TCP mode not working, what's wrong?

frontend 443_oam
bind :443 # Frontend VIP IP and listener port
default_backend oam_443 # defines backend to use

backend oam_443 # Backend name referenced from frontend config
mode tcp
option httpchk get /check HTTP/1.0\r\nHost:\ http:///
default-server inter 3s fall 3 rise 2
option log-health-checks
server oam01 :443 check

This looks like it’s structured just like the examples that HAProxy give but when I start up HAProxy all I receive is

Message from syslogd@HAProxy2 at Dec 9 08:30:33 …
haproxy[4586]: backend oam_443 has no server available!

Message from syslogd@HAProxy2 at Dec 9 08:30:33 …
haproxy[4586]: backend oam_443 has no server available!

That’s not a valid HTTP request at all.

First of all you would UPPERCASE the “GET” and second of all “http:///” is not a valid host header.

If you don’t need the host header, just write:

option httpchk GET /check HTTP/1.0

Otherwise its:

option httpchk GET /check HTTP/1.0\r\nHost:\ www.example.com

edit: its port 443 so I assume this is encrypted SSL? You can’t HTTP request in cleartext if the server expects SSL either. Use sslchecks in that case.

I was able to solve the issue by doing:

frontend 443_oam
bind :443 # Frontend VIP IP and listener port
default_backend oam_443 # defines backend to use

backend oam_443 # Backend name referenced from frontend config
mode tcp
option log-health-checks
option httpchk GET http://www./index.html
server oam01 :443 check port 80

Ok, so you are checking port 80. httpchk syntax is still wrong though.

I solved as philipcowgill, version: 1.7.5.2

backend XXX

mode tcp

###CHECK

option httpchk GET /HAcheck.php  HTTP/1.0

http-check expect status 200

###END OF CHECK

balance roundrobin

server xxx 10.0.100.10:81 send-proxy check port 80 inter 2500 maxconn 2000
server yyy 10.0.100.11:81 send-proxy check port 80 inter 2500 maxconn 2000 backup