keepalived 常见问题及解决方法

1、虚拟 ip 没有生成。

/var/log/message 日志

Jun 29 10:43:11 cloud-config2 Keepalived_vrrp[2442]: ip address associated with VRID not present in received packet : 172.21.15.64
Jun 29 10:43:11 cloud-config2 Keepalived_vrrp[2442]: one or more VIP associated with VRID mismatch actual MASTER advert
Jun 29 10:43:11 cloud-config2 Keepalived_vrrp[2442]: bogus VRRP packet received on eth0 !!!
Jun 29 10:43:11 cloud-config2 Keepalived_vrrp[2442]: VRRP_Instance(VI_1) ignoring received advertisment...

原因及解决方法:

(1)、两条主机的时间不同,将两台主机时间改为一致即可。

(2)、virtual_router_id 设置问题。

参考:

http://clovemfong.blog.51cto.com/3297559/1201791/

http://www.2cto.com/Article/201204/126118.html


2、定义的 vrrp_script 脚本未执行

原因及解决方法:

采用 service 或 systemctl 命令启动任务时,会出现这个问题。只要改为 keepalived -f keepalived.conf 启动服务即可。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章