On 19.08.2010 09:25, Pid wrote:
On 19/08/2010 04:50, Christopher Schultz wrote:
Robin,

On 8/18/2010 5:57 PM, Robin Diederen wrote:
That's interesting to say the least.

I agree with André's assessment: you have a cookie collision. See below
for hints for removing the conflict.

Without cookies enabled, I can't login to either of both applications.

You probably haven't been properly encoding your URLs.

Or the app designers haven't. Tut.

So I "designed" another test: using two browsers I visited both
applications. And guess what: it works like a charm! So I guess you
are right on the cookies :-).

The only one thing I do not understand: I've done this a few times
before and I never ran into these issues. The only difference is that
I'm using a newer version of LifeRay for the first time, but AFAIK
the other LifeRay version I used uses JSESSION too..

The difference is probably that in other installations you haven't
deployed both applications to the root ("/") context path. You never did
tell us how you deployed the two, so I suspect that both webapps are
deployed as ROOT. In that case, you get cookies from both webapps that
look like this:

host=myserver.com, path=/, name=JSESSIONID, value=12345...

Two Tomcats can't both exist in the same domain name space, unless
there's a mapping error in mod_jk.

After a cursory look through the server.xml, (cursory because of the
trauma of wading through comments), I note:

  <Listener className="org.apache.jk.config.ApacheConfig"
modJk="/opt/zimbra/httpd/modules/mod_jk.so" />

The OP made reference to the jvmRoute="jvmAlfresco1", so I think we need
to understand what's going on there to find a resolution.

Good point, so adding to the "look at the cookies" recommendation: if you are using load-balancing with mod_jk, you need to configure a unique jvmRoute for each Tomcat in server.xml. Tomcat will then add a dot "." and the value of jvmRoute to the end of the session id used in the JSESSIONID cookies. You can see it when looking at the value of the cookie in the browser.

mod_jk reads this suffix from the cookie when it is send together with each request by the browser and looks up the right Tomcat, assuming that the name of the member workers in the load-baancers are the same as the jvmRoute of the Tomct they are pointing to. If for some reason you get that wrong (worker names do not fit the jvmRoutes of the respective Tomcats), requests will eventually be send to the wrong Tomcat which does not know about the user session (except when using session clustering, an advanced topic).

Regards,

Rainer



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to