Help - Layer7 wrong status, code: 400, info: "Bad Request"

Hi All,

I’m having an issue with a new Backend (see the Subject). I’ve looked at other, similar posts here & elsewhere and I don’t think (ie can’t see if) they’re relevant to my issue. The HAProxy server is working for a number of other, existing Backends (one example included below) but not for our new Backend.

For the record we tried including the line default-server ssl check verify none and got an error with the reason: Layer7 wrong status, code: 301, info: "Moved Permanently"

Any help is greatly appreciated - thanks in advance

Here is the new Backend and one of the existing, working Backends:

backend ceph_dashboard
# Working Backend
    balance roundrobin
    option httpchk GET /
    http-check expect status 200
    server ceph01 ceph01.example.local:8080 check
    server ceph02 ceph02.example.local:8080 check
    server ceph03 ceph03.example.local:8080 check

backend ipa_dashboard
# Non-Working Backend
    balance roundrobin
    option httpchk GET /
    http-check expect status 200
    server ipa01 ipa01.example.local:443 check
    server ipa02 ipa02.example.local:443 check

Your backend server responds with a 301 redirect.

Either consider 301 an expected response (http-check expect status 301), or modify the request so that the backend returns 200 (where does the backend redirect to → use that URI in the health check).

Thanks @lukastribus, that worked - I don’t know why I didn’t think to change the expected response - doh!

Cheers

1 Like