Hi All,
I have two application servers running tomcat 5.0.28 (has to be this
version alas??)
I am using Apache 2.2.3 on RHEL 5.1
Apache is using mod_proxy_ajp and mod_proxy_balancer.
So my configs look like;
--Balance Config
<Proxy balancer://ajpCluster>
BalancerMember ajp://localhost:8009 route=node01
BalancerMember ajp://node02:8009 route=node02
</Proxy>
- Proxy Config
<VirtualHost *:80>
ServerName www.foo.com
ServerAlias node01.foo.com
ProxyPass / balancer://ajpBalance/myApp/
stickysession=JSESSIONID|jsessionid nofailover=On lbmethod=byrequests
ProxyPassReverseCookieDomain localhost foo.com
ProxyPassReverse / balancer://ajpBalance/myApp/
ProxyPassReverseCookiePath /myApp /
</VirtualHost>
The issue I am having is related to the jsessionid. If I say add
something to my cart, it is added no problem by the app. However when
I send another request for a page, and it appears to be served by
node02 of the app servers, It does not use my session from the
previous request. This is prob. because I am using
ProxyPassReverseCookie, which, has the effect of clearing my session.
If I disable all the ProxyPass directives in relation to my cookie the
app fails as the jsessionid is not attached to the request.
Now I reckon this is a fairly common issue, but I have not been able
to find anything on it yet. Does anyone know what I am doing wrong, so
that no matter what app node I hit, I will still get my session cookie
being used?
Its been wreaking my head all day, so it must be something simple I've missed.
TIA
AJ
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!