keepalived求助,当主keepalived服务停掉后,备用机无法接管

[root@avic-r710-backup ~]# service keepalived restart
停止 keepalived:[确定]
正在启动 keepalived:[确定]
[root@avic-r710-backup ~]# tail -f /var/log/messages
Sep 23 00:50:36 avic-r710-backup Keepalived_vrrp: Using LinkWatch kernel netlink reflector...
Sep 23 00:50:36 avic-r710-backup Keepalived_vrrp: VRRP_Instance(VI_1) Entering BACKUP STATE
Sep 23 00:50:36 avic-r710-backup Keepalived_vrrp: VRRP_Instance(VI_2) Entering BACKUP STATE
Sep 23 00:50:36 avic-r710-backup Keepalived_vrrp: VRRP sockpool: [ifindex(2), proto(112), fd(10,11)]
Sep 23 00:50:36 avic-r710-backup Keepalived_vrrp: VRRP sockpool: [ifindex(4), proto(112), fd(12,13)]
Sep 23 00:50:36 avic-r710-backup Keepalived_healthcheckers: Using LinkWatch kernel netlink reflector...
Sep 23 00:50:36 avic-r710-backup Keepalived_healthcheckers: Activating healtchecker for service [192.168.1.41]:80
Sep 23 00:50:36 avic-r710-backup Keepalived_healthcheckers: Activating healtchecker for service [192.168.1.43]:80
Sep 23 00:50:36 avic-r710-backup Keepalived_healthcheckers: Activating healtchecker for service [192.168.2.41]:80
Sep 23 00:50:36 avic-r710-backup Keepalived_healthcheckers: Activating healtchecker for service [192.168.2.43]:80
Sep 23 00:50:40 avic-r710-backup Keepalived_vrrp: VRRP_Instance(VI_2) Transition to MASTER STATE
Sep 23 00:50:40 avic-r710-backup Keepalived_vrrp: VRRP_Instance(VI_1) Transition to MASTER STATE
Sep 23 00:50:41 avic-r710-backup Keepalived_vrrp: VRRP_Instance(VI_2) Entering MASTER STATE
Sep 23 00:50:41 avic-r710-backup Keepalived_vrrp: VRRP_Instance(VI_2) setting protocol VIPs.
Sep 23 00:50:41 avic-r710-backup Keepalived_vrrp: VRRP_Instance(VI_2) Sending gratuitous ARPs on eth2 for 192.168.2.44
Sep 23 00:50:41 avic-r710-backup Keepalived_vrrp: VRRP_Instance(VI_1) Entering MASTER STATE
Sep 23 00:50:41 avic-r710-backup Keepalived_vrrp: VRRP_Instance(VI_1) setting protocol VIPs.
Sep 23 00:50:41 avic-r710-backup Keepalived_healthcheckers: Netlink reflector reports IP 192.168.2.44 added
Sep 23 00:50:41 avic-r710-backup avahi-daemon[2069]: Registering new address record for 192.168.2.44 on eth2.IPv4.
Sep 23 00:50:41 avic-r710-backup Keepalived_healthcheckers: Netlink reflector reports IP 192.168.1.44 added
Sep 23 00:50:41 avic-r710-backup Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 192.168.1.44
Sep 23 00:50:41 avic-r710-backup avahi-daemon[2069]: Registering new address record for 192.168.1.44 on eth0.IPv4.
Sep 23 00:50:46 avic-r710-backup Keepalived_vrrp: VRRP_Instance(VI_2) Sending gratuitous ARPs on eth2 for 192.168.2.44
Sep 23 00:50:46 avic-r710-backup Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 192.168.1.44
这是备用keepalived的日志
下面为备用keepalived的配置文件keepalived.conf:
! Configuration File for keepalived

global_defs {
notification_email {
pyao@avictc.com
wxu@avictc.com
yzhu@avictc.com
}
notification_email_from wxu@avictc.com
smtp_server 192.168.1.4
smtp_connect_timeout 30
router_id LVS_DEVEL_2
}

#LT
vrrp_instance VI_1 {
state BACKUP
interface eth0
virtual_router_id 51
priority 99
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.1.44
}
}

virtual_server 192.168.1.44 80{
delay_loop 6
lb_algo wlc
lb_kind DR
nat_mask 255.255.255.0
persistence_timeout 600
protocol TCP

real_server 192.168.1.41 80 {
weight 1
TCP_CHECK {
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
connect_port 80
}
}
real_server 192.168.1.43 80 {
weight 1
TCP_CHECK {
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
connect_port 80
}
}
}
#DX
vrrp_instance VI_2 {
state BACKUP
interface eth2
virtual_router_id 52
priority 99
advert_int 1
authentication {
auth_type PASS
auth_pass 2222
}
virtual_ipaddress {
192.168.2.44
}
}

virtual_server 192.168.2.44 80{
delay_loop 6
lb_algo wlc
lb_kind DR
nat_mask 255.255.255.0
persistence_timeout 600
protocol TCP

real_server 192.168.2.41 80 {
weight 1
TCP_CHECK {
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
connect_port 80
}
}
real_server 192.168.2.43 80 {
weight 1
TCP_CHECK {
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
connect_port 80
}
}
}

Forums:

randomness