DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=41680>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41680 Summary: Troubles with mod_proxy_balancer Product: Apache httpd-2 Version: 2.2.4 Platform: PC OS/Version: Solaris Status: NEW Severity: major Priority: P3 Component: mod_proxy_balancer AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] We have such problem situation and it is very important for us to find a very fast and effective solution: We use mod_proxy_balancer with mod_proxy_ajp in httpd-2.2.4.Tomcat (5.5.20) is used as the backend. We use stickysessions based on cookies in the balancer (CookieName=VotingRoute). Here is a part of httpd configuration taken from our configuration files ---apache.conf <Proxy balancer://tomcat_voting/> BalancerMember ajp://xxx.xxx.xxx.135:8009 route=VOTING1_CURRENT loadfactor=1 BalancerMember ajp://xxx.xxx.xxx.136:8009 route=VOTING2_CURRENT loadfactor=1 ProxySet stickysession=VotingRoute nofailover=Off </Proxy> RewriteRule /servlet/survey.Voting balancer://tomcat_voting%{REQUEST_URI} [P,L] ---/apache.conf Below you can see a sample of the httpd server log (with LogLevel=debug option),when the site looks working. As you can see from the log below queries with Cookies received before get to the right tomcat from the balancer ---debug [Tue Feb 20 14:09:36 2007] [debug] mod_proxy_balancer.c(41): proxy: BALANCER: canonicalising URL //tomcat_voting/survey/112333/4c39d6cf/ [Tue Feb 20 14:09:36 2007] [debug] mod_proxy_balancer.c(247): proxy: BALANCER: Found value x.VOTING1_CURRENT for stickysession VotingRoute [Tue Feb 20 14:09:36 2007] [debug] mod_proxy_balancer.c(257): proxy: BALANCER: Found route VOTING1_CURRENT [Tue Feb 20 14:09:36 2007] [debug] mod_proxy_balancer.c(488): proxy: BALANCER (balancer://tomcat_voting) worker (ajp://xxx.xxx.xxx.135:8009) rewritten to ajp://xxx.xxx.xxx.135:8009/survey/112333/4c39d6cf/ [Tue Feb 20 14:09:36 2007] [debug] mod_proxy.c(777): Running scheme balancer handler (attempt 0) [Tue Feb 20 14:09:36 2007] [debug] mod_proxy_http.c(1652): proxy: HTTP: declining URL ajp://xxx.xxx.xxx.135:8009/survey/112333/4c39d6cf/ [Tue Feb 20 14:09:36 2007] [debug] mod_proxy_ajp.c(507): proxy: AJP: serving URL ajp://xxx.xxx.xxx.135:8009/survey/112333/4c39d6cf/ [Tue Feb 20 14:09:36 2007] [debug] proxy_util.c(1798): proxy: AJP: has acquired connection for (xxx.xxx.xxx.135) [Tue Feb 20 14:09:36 2007] [debug] proxy_util.c(1859): proxy: connecting ajp://xxx.xxx.xxx.135:8009/survey/112333/4c39d6cf/ to xxx.xxx.xxx.135:8009 [Tue Feb 20 14:09:36 2007] [debug] proxy_util.c(1955): proxy: connected /survey/112333/4c39d6cf/ to xxx.xxx.xxx.135:8009 ---/debug But sometimes we strange things happen. Unexpectedly balancer chooses a tomcat that has different 'route' option that found in the Cookies. The query goes to the wrong tomcat and receives another Cookie from it with another 'route' in the Cookie, then the situation repeats, in other words the balancer send the query to a wrong tomcat. And it happens to every next query.Here is an example from the log files of httpd server with sending a query to a wrong Tomcat: ---debug [Tue Feb 20 11:24:17 2007] [debug] mod_proxy_balancer.c(41): proxy: BALANCER: canonicalising URL //tomcat_voting/servlet/survey.VotingSurvey [Tue Feb 20 11:24:17 2007] [debug] mod_proxy_balancer.c(247): proxy: BALANCER: Found value x.VOTING2_CURRENT for stickysession VotingRoute [Tue Feb 20 11:24:17 2007] [debug] mod_proxy_balancer.c(257): proxy: BALANCER: Found route VOTING2_CURRENT [Tue Feb 20 11:24:17 2007] [debug] mod_proxy_balancer.c(922): proxy: Entering byrequests for BALANCER (balancer://tomcat_voting) [Tue Feb 20 11:24:17 2007] [debug] mod_proxy_balancer.c(488): proxy: BALANCER (balancer://tomcat_voting) worker (ajp://xxx.xxx.xxx.135:8009) rewritten to ajp://xxx.xxx.xxx.135:8009/servlet/survey.VotingSurvey?i_n_f=survey112333_pg0_totpg2_rid9392985_lqid2020313%23errQue [Tue Feb 20 11:24:17 2007] [debug] mod_proxy.c(777): Running scheme balancer handler (attempt 0) [Tue Feb 20 11:24:17 2007] [debug] mod_proxy_http.c(1652): proxy: HTTP: declining URL ajp://xxx.xxx.xxx.135:8009/servlet/survey.VotingSurvey?i_n_f=survey112333_pg0_totpg2_rid9392985_lqid2020313%23errQue [Tue Feb 20 11:24:17 2007] [debug] mod_proxy_ajp.c(507): proxy: AJP: serving URL ajp://xxx.xxx.xxx.135:8009/servlet/survey.VotingSurvey?i_n_f=survey112333_pg0_totpg2_rid9392985_lqid2020313%23errQue [Tue Feb 20 11:24:17 2007] [debug] proxy_util.c(1798): proxy: AJP: has acquired connection for (xxx.xxx.xxx.135) [Tue Feb 20 11:24:17 2007] [debug] proxy_util.c(1859): proxy: connecting ajp://xxx.xxx.xxx.135:8009/servlet/survey.VotingSurvey?i_n_f=survey112333_pg0_totpg2_rid9392985_lqid2020313%23errQue to xxx.xxx.xxx.135:8009 [Tue Feb 20 11:24:17 2007] [debug] proxy_util.c(1955): proxy: connected /servlet/survey.VotingSurvey?i_n_f=survey112333_pg0_totpg2_rid9392985_lqid2020313%23errQue to xxx.xxx.xxx.135:8009 ---/debug We reloaded tomcats one by one but it did not help to make the balancer work correctly. Execution of 'apachectl graceful' command does not help either. Only if we reload the httpd server balancer works ok (stickysessions work). It is very hard to reproduce the problem but from time to time balancer works as described above and we have to reload the httpd server. httpd server reloading is a bad solution for us. Please recommend what we can do to solve this problem. Thanks. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
