LVS+keepalived 在real server上一直创建socket,最后导致real server 不能用
正常运行:在real server上运行TCP程序(epoll bind端口是4000),每个客户端与服务器保持一个socket连接。
问题:当运行keepalived后,real server上的程序会不断的创建socket,且real server上的程序显示recv error:Connection reset by peer,这应该是keepalived不断对real server进行检测时,每次都创建一个socket。现在不想让其不断创建socket,应该怎么解决?
keepalived.conf:
! Configuration File for keepalived
global_defs {
notification_email {
wukun@nfschina.com
}
notification_email_from Alexandre.Cassen@firewall.loc
smtp_server 192.168.200.1
smtp_connect_timeout 30
router_id LVS_DEVEL
}
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 60
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.8.241
}
}
virtual_server 192.168.8.241 4000 {
delay_loop 6
lb_algo rr
lb_kind DR
#nat_mask 255.255.255.0
persistence_timeout 50
protocol TCP
real_server 192.168.8.138 4000 {
weight 1
TCP_CHECK {
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
}
}
real_server 192.168.8.136 4000 {
weight 1
TCP_CHECK {
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
}
}
}
lijianqiuyan
周五, 2015-07-10 03:07
Permalink
tcp_check注释掉啊
tcp_check注释掉啊
Anonymous (没有被验证)
周一, 2015-08-10 09:17
Permalink
去掉不行
去掉就不能做健康检查了啊