Summary: | Troubles with mod_proxy_balancer | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | bondaron <andriju> |
Component: | mod_proxy_balancer | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | major | CC: | andriju |
Priority: | P3 | ||
Version: | 2.2.4 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Solaris |
Description
bondaron
2007-02-22 09:01:45 UTC
From what I can see here is that the balancer switches to another Tomcat because the Tomcat with the correct route set is not available. As you have set nofailover=Off this works as designed. If you would have set nofailover=On there should be the following error message in the log in such situations: All workers are in error state for route. Please have a look in your error log for lines that contain the words 'proxy' and 'failed'. To check the status of single workers please enable the balancer manager (http://httpd.apache.org/docs/2.2/en/mod/mod_proxy_balancer.html#enable) and have a look on its status page. Thank you. Balancer-manager turned out to be a very helpful tool for analyzing of failures. We seem to have found the reasons why we had issues with stickysessions. At least we believe that these were the reasons. If there are a few back-ends in the balancer description, then if a back-end is either deleted or added from/to the beginning of the list, then Route values of the following back-ends are changed. As an example here is a part of our test configuration: ... <Proxy balancer://app/> BalancerMember ajp://app1:8009 route=T1 loadfactor=1 BalancerMember ajp://app2:8009 route=T2 loadfactor=1 BalancerMember ajp://app3:8009 route=T3 loadfactor=1 BalancerMember ajp://app4:8009 route=T4 loadfactor=1 ProxySet stickysession=SessionRoute nofailover=Off </Proxy> ... After rebooting the httpd server we can see the following on the balancer-manager page ... Worker URL Route RouteRedir Factor Set Status Elected To From ajp://app1:8009 T1 1 0 Ok 325 1.3K 1.3M ajp://app2:8009 T2 1 0 Ok 271 587 1.2M ajp://app3:8009 T3 1 0 Ok 150 19K 1.2M ajp://app4:8009 T4 1 0 Ok 137 38K 1.3M ... However, balancer works fine. But if a 'ajp://app2:8009' back-end is deleted and then 'apachectl graceful' command is run, the following will be seen on the balancer-manager page: ... Worker URL Route RouteRedir Factor Set Status Elected To From ajp://app1:8009 T1 1 0 Ok 325 1.3K 1.3M ajp://app3:8009 T2 1 0 Ok 271 587 1.2M ajp://app4:8009 T3 1 0 Ok 150 19K 1.2M ... Routes 'T2' и 'T3 correspond to ‘app3’ and ‘app4’ back-ends '. As a result StickySessions work non-properly. Adding back-ends to the list also results in bad referencing for the ‘Route’ options even though they are defined by the configuration. Also, we noticed that deleting or adding back-ends affects properties of back-ends for other balancers as well, even back-ends for other VirtualHost sections. Of course after changing balancers descriptions we can reboot the httpd server or correct Route options with the help of balancer-manager. But the first approach is not fine for us as we use the server 24x7, and the latter is not very good for us either as there are many balancers in the server’s configuration. |