我试图在Keepalived中设置一个简单的虚拟服务器,当服务器从池中删除时,它们不会自动重新添加。 在Keepalived服务器系统日志中,我看到:
Oct 01 11:37:39 lb2 kernel: IPVS: WRR: no destination available: no destinations present Oct 01 11:37:40 lb2 kernel: IPVS: WRR: no destination available: no destinations present Oct 01 11:37:40 lb2 kernel: IPVS: WRR: no destination available: no destinations present Oct 01 11:37:41 lb2 kernel: IPVS: WRR: no destination available: no destinations present Oct 01 11:37:44 lb2 kernel: IPVS: WRR: no destination available: no destinations present Oct 01 11:37:47 lb2 kernel: IPVS: WRR: no destination available: no destinations present Oct 01 11:37:48 lb2 kernel: IPVS: WRR: no destination available: no destinations present Oct 01 11:37:48 lb2 kernel: IPVS: WRR: no destination available: no destinations present Oct 01 11:37:49 lb2 kernel: IPVS: WRR: no destination available: no destinations present Oct 01 11:37:49 lb2 kernel: IPVS: WRR: no destination available: no destinations present Oct 01 11:37:50 lb2 kernel: IPVS: WRR: no destination available: no destinations present Oct 01 11:37:50 lb2 kernel: IPVS: WRR: no destination available: no destinations present Oct 01 11:37:51 lb2 kernel: IPVS: WRR: no destination available: no destinations present Oct 01 11:37:51 lb2 kernel: IPVS: WRR: no destination available: no destinations present
ipvsadm输出:
[ashinn@lb2 ~]$ sudo ipvsadm IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags -> RemoteAddress:Port Forward Weight ActiveConn InActConn FWM 700000 wrr persistent 300
这里是keepalived.conf的相关部分:
virtual_server fwmark 700000 { delay_loop 20 lb_algo wrr lb_kind NAT persistence_timeout 300 protocol TCP real_server 10.10.35.11 443 { weight 24 SSL_GET { url { path /check.php } } } real_server 10.10.35.12 443 { weight 24 SSL_GET { url { path /check.php } } } }
Keepalived服务器确实可以到达真正的服务器:
[ashinn@lb2 ~]$ curl -k https://10.10.35.11/check.php FAIL<br/> /usr/bin/mencoder is not executable.<br/> dio extension is not loaded.<br/>
任何想法,为什么服务器不会被删除后重新添加?