I’m having trouble getting a simple redirect to work on the load balancer. It’s very possible I missed something silly but could use a 2nd pair of eyes.
stats-and-archives-asp-site is the primary mysite.com site and is hosted outside of rancher. My objective is to use Rancher for SSL termination so requests are still served from the primary asp-based site. This target has a health check on it which is passing.
When I visit the root domain (which I’ve modified my local
/etc/hosts to point to the load balancer) I see a 503 as if the load balancer isn’t seeing the request.
Anyone have any ideas on what I should look at?
Balancer (HAproxy) use healthcheck, did you setup stats-and-archives-asp-site as a external service with healthcheck ? As fast check you can setup HAproxy to show statistics, add this to haproxy configuration:
stats realm Haproxy\ Statistics
stats uri /haproxy_stats
and then add service rule, TCP port 9000 with lb as a target. Then you can access :9000/haproxy_stats to see status of frontends and backends (check healthcheck status).
Thanks for following up! I just had time to get around to this. It looks like the ip address I’m redirecting to is shown as down within the ha proxy stats. However the Rancher api shows that external service as being healthy:
"requestLine": "GET \"/Archives.aspx?VSN=BBX\" \"HTTP/1.0\"",
Hm, that’s strange, if you point cursor to last check text popup window with last state should be visible (probably something like reset). You can enable haproxy logging, if you have syslog server it’s easy, also you can setup something like this https://github.com/outstand/docker-syslog-ng-stdout (sidekick container with rsyslog)