我无法使我们的网站之一(IIS7)的代理工作。 我正在从haproxy日志中获取“无路由到主机”消息。
Server test_be/10.100.1.1:81 is DOWN, reason: Layer4 connection problem, info: "No route to host", check duration: 1000ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue. backend test_be has no server available!
这是我迄今为止发现的:
haproxy前端/后端configuration(不起作用):
frontend test bind 10.100.2.2:80 mode http option httplog default_backend test_be backend test_be option httpchk balance source server s1 10.100.1.1:81 check port 81
haproxy替代configuration(工程):
listen test_direct bind 10.100.2.2:80 mode tcp option tcplog balance source server s1 10.100.1.1:81
你能帮我理解为什么前端/后端设置不起作用吗? 我想要使用它,因为我想根据请求进入额外的规则。难道这可能是由于健康检查不满意? (我其实不知道这是怎么发生的。)
我在这里分开我的头发。
Haproxy从IIS服务器(http 200/300)请求一个有效的返回,在你的情况下,我猜测它返回一个404,因为一个默认的索引页面不存在。 您可能还想要将您希望检查的url(/test.html)添加到httpchkconfiguration行。