[ILUG] Annoying Apache Mod_Proxy_Balance With AJP issue

AJ McKee aj.mckee at gmail.com
Wed Jul 22 09:50:39 IST 2009


Howdy all,

Here is a weird Apache Mod_Proxy_Balance issue affecting me at
present. Maybe I've forgotten something here, but I doubt it.

So I am using mod_proxy_ajp along with mod_proxy_balance to distribute
requests amongst several Jboss 4 Servers (I Know)


So here is the deal, Apache appears to be ignoring the jvm route when
sending the request to the backend Jboss server.

Hers's what I've done

Jboss Side
Added the jvmRoute to the serverl.xml of the jbossweb.tomcat.sar

Apache Side

<Proxy balancer://jboss-balancer>
BalancerMember ajp://10.10.10.71:8009 route=nodes001
BalancerMember ajp://10.10.10.73:8009 route=nodes003
</Proxy>

ProxyPass / balancer://jboss-balancer/ stickysession=JSESSIONID
lbmethod=bytraffic nofailover=Off

Now I've brought the above configs right down to the most basic
settings. When I've enabled the debug in Apache, I see the session
cookie no bother with the route appended, however mod_proxy_ajp seems
to want to send it to the other member in the balance. So edit my
cookie and give it the other route, hey presto, it wants to send it to
the other member then. In short,m it appears not to respect the route
setting.

Anyone got any ideas. More frustrated than anything as I've done this
tonnes of times with Tomcat (Which jboss uses) unless of course I've
forgotten something.

TIA
AJ



More information about the ILUG mailing list