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/ 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: returns value
  • haproxy frontend/backend config (does not work):

    frontend test
        mode http
        option httplog
        default_backend test_be
    backend test_be
        option httpchk
        balance source
        server s1 check port 81
  • haproxy alternative config (that works):

    listen test_direct
        mode tcp
        option tcplog
        balance source
        server s1
  • 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.


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.

| improve this answer | |
  • Thanks for the quick answer! Enabling a default page work on the website worked. Before that, I tried putting a specific page to test (option httpchk HEAD /test.html HTML/1.1)---it fails but with different error (Bad Request). – Ianthe the Duke of Nukem Feb 2 '16 at 6:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.