Keepalived disconnects

keepalived

On my Sles i have keepalived, and haproxy. In two days i had 4 disconnects from keepalived.
Keepalived v1.2.7 (11/20,2012)

In syslog only this messages. Who can help with solving the problem?

Keepalived_vrrp[28102]: VRRP_Script(chk_haproxy) timed out
Keepalived_vrrp[28102]: Process [448] didn't respond to SIGTERM
Keepalived_vrrp[28102]: Process [450] didn't respond to SIGTERM
Keepalived_vrrp[28102]: VRRP_Script(chk_haproxy) succeeded

My config looks like

vrrp_script chk_haproxy {           
        script "killall -0 haproxy"    
        interval 2                     
        weight 2                        
}
vrrp_instance VIP_1 {
        interface eth2
        state MASTER
        virtual_router_id 88
        priority 101                   
        virtual_ipaddress {
            192.168.1.95
        }
        track_script {
            chk_haproxy
        }

Best Answer

We have a similar setup, but using kamailio instead of haproxy. Anyway, we were seeing messages like that, so we change the way we were performing the checks (our checks have nothing to do with yours, we were checking that kamailio responds to OPTIONs requests).

You can try to add fall 3, which means that the check script should fail 3 times before changing state. Also, weight is useless in the vrrp_script section.

vrrp_script chk_haproxy {           
        script "killall -0 haproxy"    
        interval 2                     
        fall 3                        
}
vrrp_instance VIP_1 {
        interface eth2
        state MASTER
        virtual_router_id 88
        priority 101                   
        virtual_ipaddress {
            192.168.1.95
        }
        track_script {
            chk_haproxy
        }

Good luck!