问题说明:
keepalived已启动但vip 没有生成。/var/log/messages日志不断刷屏
tail /var/log/messages
Nov 3 11:51:03 cache-redis-01 Keepalived_vrrp[1269]: (redis): ip address associated with VRID 53 not present in MASTER advert : 172.16.1.63
Nov 3 11:51:03 cache-redis-01 Keepalived_vrrp[1269]: bogus VRRP packet received on eth0 !!!
Nov 3 11:51:03 cache-redis-01 Keepalived_vrrp[1269]: VRRP_Instance(redis) ignoring received advertisment...
问题分析及解决方案:
1、两条主机的时间不同,将两台主机时间改为一致即可。
2、virtual_router_id 设置有问题,修改一下其他数字试试。
3、vrrp的优先级设置有问题,默认设备故障会自动降10,所以差值不要超过10。