问题原文
原帖链接 · Ianthe the Duke of Nukem · CC BY-SA 3.0
I couldn't make the proxy work for one of our websites (IIS7). I am getting a "no route to host" message from the haproxy logs.
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!
Here's what I found so far:
- No firewalls are active in both machines.
- ping, tracepath and telnet work.
- Curl-ing from the haproxy machine is successful like: http://10.100.1.1:81/test.html returns value
haproxy frontend/backend config (does not work):
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 81haproxy alternative config (that works):
listen test_direct bind 10.100.2.2:80 mode tcp option tcplog balance source server s1 10.100.1.1:81- Other IIS website backends work as well.
Can you please help me understand why the frontend/backend setup doesn't work? I want to use it because I want to put additional rules based on requests coming in. Could it perhaps be due to health checks not being satisfied? (I actually don't know exactly how that happens.)
I'm splitting my hairs here.
已采纳解答
原帖链接 · Flash · CC BY-SA 3.0
Haproxy requests a valid return from the IIS server (http 200/300), in your case I am guessing it returns a 404 since a default index page does not exist. You may also want to add the url you wish to check (/test.html) to the httpchk config line.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
