0

The following acl doesn't work for me:

acl no_waf nbsrv(to_waf) lt 1
use_backend back-www if no_waf
default_backend to_waf

I keep getting error 503 (No server is available to handle this request.) instead of being sent to the backend back-www.

Any ideas?

**EDIT, backend to_waf looks like this:

backend to_waf

    option  forwardfor header X-Forwarded-For

    option  httpchk HEAD / HTTP/1.0

    http-check expect status 404

    timeout server 25s

    server  10.30.10.2:9000    10.30.10.2:9000    check
4
  • Do you have health checks configured on the servers in to_waf? If not, HAProxy has no real option but to assume they are up and fail when it turns out that they aren't. Jan 12, 2017 at 21:47
  • Yes, my backend looks like this:backend to_waf option forwardfor header X-Forwarded-For option httpchk HEAD / HTTP/1.0 http-check expect status 404 timeout server 25s server 10.30.10.2:9000 10.30.10.2:9000 check
    – Multihomed
    Jan 13, 2017 at 0:45
  • What do you see in the HAProxy logs? Jan 13, 2017 at 0:51
  • localhost haproxy[29072]: Server to_waf/10.30.10.2:9000 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue. Jan 12 19:48:27 localhost haproxy[29072]: backend to_waf has no server available!
    – Multihomed
    Jan 13, 2017 at 0:54

1 Answer 1

0

Found it: I was reloading haproxy and there was a error in the config file, for some reason reloading it didn't trigger any error message. When I tried to restart the service I got the error, after fixing it the condition started to work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .