HAProxy option httpchk is not working

haproxy

Given below is my haproxy.xfg file. HAPRoxy version 1.4.18, released 2011/09/16 is not making any calls to heatbeat.html.
And although server1 does not have heartbeat.html it is sending traffic to both the servers.

global
    log         127.0.0.1 local2
    chroot      /var/lib/haproxy
    pidfile     /var/run/haproxy.pid
    maxconn     4000
    #user        haproxy
    #group       haproxy
    daemon

defaults
    mode                    http
    log                     global
    option                  httplog
    option                  dontlognull
    retries                 1
    timeout http-request    300s
    timeout queue           1m
    timeout connect         10s
    timeout client          1m
    timeout server          1m
    timeout http-keep-alive 10s
    timeout check           10s
    maxconn                 3000

listen http_proxy 0.0.0.0:8980
    mode http
    cookie JSESSIONID prefix
    balance roundrobin
    option httpchk HEAD /heartbeat/heartbeat.html HTTP/1.0
    server  app11 10.x.x.11:8080 cookie check inter 1000 fall 1 rise 1
    server  app13 10.x.x.12:8080 cookie check inter 1000 fall 1 rise 1

Best Answer

You need to name your cookie: cookie name. Currently it is being named "check," resulting in no checks.