keepalived脑裂问题

keepalived脑裂问题

今天又被坑了,同事提供机器的时候没有仔细检查,然后keepalived,mysql就部署,项目上线了。
中午服务器故障宕机重启,发现log异常,脑裂现象,检查半天,改什么优先级,什么master和backup,还有那个号,
都不行,最后仔细一看发现iptables启动着的,悲剧,这个锅啊。

A机
Nov 29 16:25:44 ip-192-168-1-190 Keepalived_vrrp[3914]: VRRP_Instance(id175) Transition to MASTER STATE
Nov 29 16:25:45 ip-192-168-1-190 Keepalived_vrrp[3914]: VRRP_Instance(id175) Entering MASTER STATE
Nov 29 16:25:45 ip-192-168-1-190 Keepalived_vrrp[3914]: VRRP_Instance(id175) setting protocol VIPs.
Nov 29 16:25:45 ip-192-168-1-190 Keepalived_vrrp[3914]: VRRP_Instance(id175) Sending gratuitous ARPs on bond0 for 192.168.1.175
Nov 29 16:25:45 ip-192-168-1-190 Keepalived_healthcheckers[3913]: Netlink reflector reports IP 192.168.1.175 added
Nov 29 16:25:50 ip-192-168-1-190 Keepalived_vrrp[3914]: VRRP_Instance(id175) Sending gratuitous ARPs on bond0 for 192.168.1.175
Nov 29 16:25:52 ip-192-168-1-190 Keepalived[3912]: Stopping Keepalived v1.2.13 (03/19,2015)
Nov 29 16:25:52 ip-192-168-1-190 Keepalived_vrrp[3914]: VRRP_Instance(id175) sending 0 priority
Nov 29 16:25:52 ip-192-168-1-190 Keepalived_vrrp[3914]: VRRP_Instance(id175) removing protocol VIPs.
Nov 29 16:25:52 ip-192-168-1-190 Keepalived_healthcheckers[3913]: Removing service [192.168.1.190]:3306 from VS [192.168.1.175]:3306
Nov 29 16:25:52 ip-192-168-1-190 kernel: IPVS: __ip_vs_del_service: enter

B机
Nov 29 16:25:51 ip-192-168-1-191 Keepalived_vrrp[4795]: VRRP_Instance(id175) Sending gratuitous ARPs on bond0 for 192.168.1.175
Nov 29 16:25:52 ip-192-168-1-191 Keepalived_vrrp[4795]: VRRP_Instance(id175) Received lower prio advert, forcing new election
Nov 29 16:25:52 ip-192-168-1-191 Keepalived_vrrp[4795]: VRRP_Instance(id175) Sending gratuitous ARPs on bond0 for 192.168.1.175
Nov 29 16:25:52 ip-192-168-1-191 Keepalived_vrrp[4795]: VRRP_Instance(id175) Received lower prio advert, forcing new election
Nov 29 16:25:52 ip-192-168-1-191 Keepalived_vrrp[4795]: VRRP_Instance(id175) Sending gratuitous ARPs on bond0 for 192.168.1.175




关闭防火墙后正常
Nov 29 16:46:49 ip-192-168-1-190 Keepalived_vrrp[4098]: Configuration is using : 62527 Bytes
Nov 29 16:46:49 ip-192-168-1-190 Keepalived_vrrp[4098]: Using LinkWatch kernel netlink reflector...
Nov 29 16:46:49 ip-192-168-1-190 Keepalived_vrrp[4098]: VRRP_Instance(id175) Entering BACKUP STATE
Nov 29 16:46:49 ip-192-168-1-190 Keepalived_vrrp[4098]: VRRP sockpool: [ifindex(7), proto(112), unicast(0), fd(10,11)]
Nov 29 16:46:49 ip-192-168-1-190 Keepalived_healthcheckers[4097]: Using LinkWatch kernel netlink reflector...
Nov 29 16:46:49 ip-192-168-1-190 Keepalived_healthcheckers[4097]: Activating healthchecker for service [192.168.1.190]:3306

你可能感兴趣的:(haproxy+lvs)