I am trying to setup a comiled keepalived 1.2.19 on ubuntu 14.04 with failover. Somehow the virtual ip never shows up:
ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:60:7f:89 brd ff:ff:ff:ff:ff:ff
inet 192.168.56.120/24 brd 192.168.56.255 scope global eth0
valid_lft forever preferred_lft forever
inet 192.168.56.121/24 brd 192.168.56.255 scope global secondary eth0:0
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe60:7f89/64 scope link
valid_lft forever preferred_lft forever
The configuration file looks like this:
! Configuration File for keepalived
vrrp_script chk_haproxy { # Requires keepalived-1.1.13
script "killall -0 haproxy" # cheaper than pidof
interval 2 # check every 2 seconds
weight 2 # add 2 points of prio if OK
}
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 101
priority 101 # 101 on master; 100 on backup
virtual_ipaddress {
192.168.56.150
}
track_script {
chk_haproxy
}
}
This looks pretty basic to setup. What am I doing wrong?
Syslog after restart of keepalived:
Keepalived[4821]: Stopping Keepalived v1.2.19 (08/15,2015)
Keepalived[4988]: Starting Keepalived v1.2.19 (08/15,2015)
Keepalived[4989]: Starting Healthcheck child process, pid=4990
Keepalived_healthcheckers[4990]: Initializing ipvs 2.6
Keepalived[4989]: Starting VRRP child process, pid=4991
Keepalived_healthcheckers[4990]: Registering Kernel netlink reflector
Keepalived_healthcheckers[4990]: Registering Kernel netlink command channel
Keepalived_healthcheckers[4990]: Configuration is using : 6006 Bytes
Keepalived_vrrp[4991]: Registering Kernel netlink reflector
Keepalived_vrrp[4991]: Registering Kernel netlink command channel
Keepalived_vrrp[4991]: Registering gratuitous ARP shared channel
Keepalived_vrrp[4991]: Configuration is using : 57026 Bytes
Keepalived_vrrp[4991]: Using LinkWatch kernel netlink reflector...
Keepalived_healthcheckers[4990]: Using LinkWatch kernel netlink reflector...