Any thoughts on this before I post a bug report? On Tue, Jun 15, 2021 at 9:07 PM Nick Folino <n...@folino.us> wrote:
> So I changed the config to eliminate the order question: > > <Proxy "balancer://rz"> > Header add Set-Cookie "RZROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" > env=BALANCER_ROUTE_CHANGED > BalancerMember http://www.google.com route=01 > BalancerMember http://www.yahoo.com route=02 > ProxySet stickysession=RZROUTEID > </Proxy> > <Proxy "balancer://rz2"> > Header add Set-Cookie "RZ2ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" > env=BALANCER_ROUTE_CHANGED > BalancerMember http://www.fox.com <http://www.google.com> route=03 > BalancerMember http://www.cnn.com <http://www.yahoo.com> route=04 > ProxySet stickysession=RZ2ROUTEID > </Proxy> > > ProxyPass "/goog" "balancer://rz/" > ProxyPassReverse "/goog" "balancer://rz/" > ProxyPass "/good" "balancer://rz2/" > ProxyPassReverse "/good" "balancer://rz2/" > > going to http://myserver/goog redirects to the Google page and a > set-cookie RZROUTEID=.01 > going to http://myserver/good redirects to Fox and a > set-cookie RZ2ROUTEID=.03 and a second set-cookie for RZROUTEID=.03 > > going back to http://myserver/goog redirects to Yahoo and dets a > set-cookie RZROUTEID=.02 > > Nick > > On Tue, Jun 15, 2021 at 7:57 PM Nick Folino <n...@folino.us> wrote: > >> I thought that too, but if the rz proxypass was catching all traffic for >> rz2, then I wouldn't expect any traffic to get to rz2. >> But traffic does go to rz2 and all of that works, except it resets the rz >> route cookie. >> >> On Tue, Jun 15, 2021 at 3:27 PM Daniel Ferradal <dferra...@apache.org> >> wrote: >> >>> If I am looking at it correctly the order of the ProxyPass directives >>> you defined is not the correct one, /sz defined first would be overriding >>> /sz2. So sz2 should be defined first. >>> >>> Perhaps that's why you are getting wrong values ? (Browser cache or >>> similar?) >>> >>> El mar., 15 jun. 2021 19:00, Nick Folino <n...@folino.us> escribió: >>> >>>> I ran into an interesting situation with cookies being reset >>>> in balancers. >>>> I couldn't find any documentation on whether numbers are allowed in >>>> balancer names. >>>> >>>> I have this config: >>>> >>>> <Proxy balancer://rz> >>>> Header add Set-Cookie "RZROUTEID=.%{BALANCER_WORKER_ROUTE}e; >>>> path=/" env=BALANCER_ROUTE_CHANGED >>>> BalancerMember ajp://server1 route=01 >>>> BalancerMember ajp://server2 route=02 >>>> ProxySet stickysession=RZROUTEID >>>> </Proxy> >>>> >>>> <Proxy balancer://rz2> >>>> Header add Set-Cookie "RZ2ROUTEID=.%{BALANCER_WORKER_ROUTE}e; >>>> path=/" env=BALANCER_ROUTE_CHANGED >>>> BalancerMember ajp://server3 route=03 >>>> BalancerMember ajp://server4 route=04 >>>> ProxySet stickysession=RZ2ROUTEID >>>> </Proxy> >>>> >>>> ProxyPass /rz balancer://rz/rz >>>> ProxyPass /rz2 balancer://rz2/rz2 >>>> >>>> >>>> All works as expected when going to http://myhost/rz >>>> I get the RZROUTEID cookie set to 01 or 02 on first hit and it stays >>>> set. >>>> >>>> If I then go to http://myhost/rz2 I get the RZ2ROUTEID set to 03 or 04 >>>> but also another cookie set for RZROUTE with the same value as the >>>> RZ2ROUTEID cookie. >>>> >>>> This causes an issue when going back to /rz as the RZROUTEID cookie is >>>> now invalid and gets reset based on the balancing rules. >>>> >>>> I solved the problem by renaming the rz2 balancer to a new name with a >>>> digit. >>>> Is this by design that digits cause problems in balancer names? or is >>>> this a bug? >>>> >>>> Nick >>>> >>>>