大网数据广告活动
服务器运维问答

keepalived multiple instances

· 52CE 我爱测

I have two application servers running keepalived that are both using keepalived on the same network. I keep seeing Jan 8 11:49:01 <server> Keepalived_vrrp[13764]: bogus VRRP packet received on eth0 !!! in syslog. The problem see…

问题原文

原帖链接 · jak119 · CC BY-SA 3.0

I have two application servers running keepalived that are both using keepalived on the same network. I keep seeing Jan 8 11:49:01 <server> Keepalived_vrrp[13764]: bogus VRRP packet received on eth0 !!! in syslog. The problem seemed to appear after I brought the second application online yesterday, is there a proper way to resolve this issue other than isolating the applications from each other?

Below is the keepalived.conf from one of the nodes on one of the app servers, they're all similar, the two different apps use different passwords but both use the same virtual_router_id.

! Configuration File for keepalived

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 100
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 2222
    }
    virtual_ipaddress {
        <public_ip>/24 dev eth0
    }
}

已采纳解答

原帖链接 · jak119 · CC BY-SA 3.0

I was able to resolve this by adding the following to the vrrp_instance VI_1 block.

vrrp_unicast_bind 192.168.1.11   # Internal IP of this machine
vrrp_unicast_peer 192.168.1.12   # Internal IP of peer

It appears that originally that the heartbeat was going out over unicast and being picked up by the other instances. By defining the peer(s) of the machine you avoid this issue.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2015-01-08)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。