今天在客户那边上线的nginx+keepalived 集群突然报错:
在/var/log/messages :one or more vip associated with vrid mismatch actual master advert
原因:客户在同一网段中部署了新一套keepalived环境,导致virtual_router_id值跟我们部署的集群系统中该值冲突了,均使用了默认的值:51
解决方法:
修改其中一套集群中主从节点中keepalived的virtual_router_id 即可,主从需要保持一致
/usr/local/keepalived/etc/keepalived/keepalived.conf 中
1
2
3
4
5
6
|
Master:
vrrp_instance VI_1 {
interface eth0
state MASTER
virtual_router_id 88 ====>默认是51
priority 100
|
1
2
3
4
5
6
|
Slave:
vrrp_instance VI_1 {
interface eth0
state BACKUP
virtual_router_id 88 ====>默认是51,统一集群MASTER跟Slave需要保持一致
priority 90
|
重新启动keepalived 即可。
本文转自 暗黑魔君 51CTO博客,原文链接:http://blog.51cto.com/clovemfong/1201791,如需转载请自行联系原作者