您好,登錄后才能下訂單哦!
在線上部署keepalived的時候遇到了問題總結下:
2臺服務器
eth0為內網卡
eth2為外網卡
在主備切換的時候沒有收到vrrp廣播包
剛開始部署的時候copy的網上的配置文件,所以中招了
錯誤日志信息:/var/log/message
Oct 9 07:57:35 test4 Keepalived_vrrp[22495]: Sync instance needed on eth2 !!!
Oct 9 07:57:35 test4 Keepalived_vrrp[22495]: VRRP_Instance(VI_10) Dropping received VRRP packet...
Oct 9 07:57:37 test4 Keepalived_vrrp[22495]: advertissement interval mismatch mine=1000000 rcved=2
Oct 9 07:57:37 test4 Keepalived_vrrp[22495]: Sync instance needed on eth2 !!!
Oct 9 07:57:37 test4 Keepalived_vrrp[22495]: VRRP_Instance(VI_10) Dropping received VRRP packet...
Oct 9 07:57:39 test4 Keepalived_vrrp[22495]: advertissement interval mismatch mine=1000000 rcved=2
Oct 9 07:57:39 test4 Keepalived_vrrp[22495]: Sync instance needed on eth2 !!!
Oct 9 07:57:39 test4 Keepalived_vrrp[22495]: VRRP_Instance(VI_10) Dropping received VRRP packet...
Oct 9 07:57:41 test4 Keepalived_vrrp[22495]: advertissement interval mismatch mine=1000000 rcved=2
Oct 9 07:57:41 test4 Keepalived_vrrp[22495]: Sync instance needed on eth2 !!!
Oct 9 07:57:41 test4 Keepalived_vrrp[22495]: VRRP_Instance(VI_10) Dropping received VRRP packet...
Oct 9 07:57:43 test4 Keepalived_vrrp[22495]: advertissement interval mismatch mine=1000000 rcved=2
Oct 9 07:57:43 test4 Keepalived_vrrp[22495]: Sync instance needed on eth2 !!!
Oct 9 07:57:43 test4 Keepalived_vrrp[22495]: VRRP_Instance(VI_10) Dropping received VRRP packet..
解決方法:
vrrp_instance VI_10 {
state BACKUP
interface eth0 注意:eth0是內網網卡,這個選項是定義接受vrrp廣播包的網卡,而不是有的博客說的虛擬ip綁定的網卡,這里被網上配置文件給坑了。
virtual_router_id 111
mcast_src_ip 10.28.163.89
priority 100
nopreempt
authentication {
auth_type PASS
auth_pass HAmysql
}
track_script {
check_mysqld
}
virtual_ipaddress {
1.1.1.1/29 dev eth2 scope global 這里才是定義vip綁定的網卡為eth2
}
}
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。