tomcat8 - Varnish Backend_health - Still sick -
i'm using varnish-3.0.6-1 on 1 host , tomcat8 on another. tomcat running fine reason can't varnish backend healthy.
here's config:
probe healthcheck { .url = "/openam/"; .timeout = 3 s; .interval = 10 s; .window = 3; .threshold = 2; .expected_response = 302; } backend { .host = "<internal-ip>"; .port = "8090"; .probe = healthcheck; } sub vcl_recv { if (req.request == "purge") { if (!client.ip ~ purgers) { error 405 "you not permitted purge"; } return(lookup); } else if (req.http.host == "bla.domain.com" || req.http.host == "<external-ip>") { set req.backend = am; } else if (req.url ~ "\.(ico|gif|jpe?g|png|bmp|swf|js)$") { unset req.http.cookie; set req.backend = lighttpds; } else { set req.backend = apaches; } } it shows:
backend_health - still sick 4--x-r- 0 2 3 0.001956 0.000000 http/1.1 302 telnet works fine host, thing can't figure out curl returns 302 , that's because main page under 'openam' on tomcat redirects page.
$ curl -i http://<internal-ip>:8090/openam/ http/1.1 302 location: http://<internal-ip>:8090/openam/config/options.htm transfer-encoding: chunked date: tue, 12 sep 2017 15:00:24 gmt is there way fix problem?
any advice appreciated, thanks
based on information provided, you're hitting on this bug of varnish 3.
the reporter had 3.0.7 , that's 1 available in packaged releases have build sources.
so considering that, , varnish 3 being quite old, rather recommend upgrade newer varnish 4 or 5. (it's easier rewrite few lines of vcl maintaining compiled sources , hassle associated making sure it's up-to-date).
another obvious solution adjusting app send http reason along code, or perhaps point final redirect location might (or not) provide reason in http status.
check whether curl -il http://<internal-ip>:8090/openam/config/options.htm provides reason in output.
if it's http/1.1 200 ok , not http/1.1 200 update health check url (naturally adjust expected response code well).
Comments
Post a Comment