keepalived 主从配置日志报错:one or more vip associated with vrid mismatch actual master advert

今天在客户那边上线的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 中

Master:
vrrp_instance VI_1 {
        interface eth0
        state MASTER              
        virtual_router_id 88 ====>默认是51
        priority  100
Slave:
vrrp_instance VI_1 {
        interface eth0
        state BACKUP              
     virtual_router_id 88 ====>默认是51,统一集群MASTER跟Slave需要保持一致
        priority  90

重新启动keepalived 即可。

你可能感兴趣的:(nginx,keepalived)