您好,登錄后才能下訂單哦!
在線上部署keepalived的時(shí)候遇到了問題總結(jié)下:
2臺(tái)服務(wù)器
eth0為內(nèi)網(wǎng)卡
eth2為外網(wǎng)卡
在主備切換的時(shí)候沒有收到vrrp廣播包
剛開始部署的時(shí)候copy的網(wǎng)上的配置文件,所以中招了
錯(cuò)誤日志信息:/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是內(nèi)網(wǎng)網(wǎng)卡,這個(gè)選項(xiàng)是定義接受vrrp廣播包的網(wǎng)卡,而不是有的博客說的虛擬ip綁定的網(wǎng)卡,這里被網(wǎng)上配置文件給坑了。
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綁定的網(wǎng)卡為eth2
}
}
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。