后端服务器三节点集群,用ldirectord + keepalived的方式部署,出现了udp端口健康检查通过,但是后端服务器没有加入转发池的情况;通过抓包发现健康检查的报文都是正常的,但/var/log/ldirectord.log中没有该端口Add到转发池中的打印,只有之前移除的打印。ldirectord的配置如下:
# 1812
virtual = 172.xx.xx.179:1812
real = 172.xx.xx.178:1812 gate
real = 172.xx.xx.3:1812 gate
real = 172.xx.xx.4:1812 gate
protocol = udp
scheduler = sh
checktype = negotiate
service = http
checkport = 8282
request = "api/alive/check"
receive = "ok"