I've been digging around in the source for Tomcat 4.1.27, and this is
what I've found.

The problem I've had with not being able to get load balancing to work
in my application is a problem with Basic Authentication. Since Basic
authentication never sends a JSESSIONID cookie, the jvmRoute is never
available to mod_jk.

This issue was obscured by the fact that I was using the SingleSignOn
valve. This facility creates its own cookie JSESSIONIDSSO. This
cookie also doesn't have the jvrRoute attached and that sent me on a
wild goose chase through the wrong code.

I've reworked my app to support FORM authentication even thought this
requires a form for each servlet context and extra JkMount points.

Thanks to Chris Daniluk for setting me on the right track.

G. Wade

"G. Wade Johnson" wrote:
> 
> Chris,
> 
> I've been investigating something that you said that triggered an
> a weird train of thought.
> 
> My application is using the SingleSignOn Valve to allow a set of
> Servlets to work together. This means that I don't get the JSESSIONID
> cookie, I get the JSESSIONIDSSO cookie. Once you pointed it out, I
> realized that the jvmRoute was not on the end of the cookie.
> 
> Looking in the mod_jk source, I can't find anywhere the '*SSO' cookie
> is used. It would not have been read, even if it had been sent.
> 
> I'm doing further research. I'll post what I find.
> 
> Thanks for all of your help so far.
> G. Wade
> 
> Cristopher Daniluk wrote:
> >
> > Turn on the mod_jk logging. We had all sorts of problems with it at
> > first. Turned out to be an incompatibility between the binary and apache
> > with ours, but there's lots of possibilities.
> >
> > Check the mod_jk log and see if its having communication errors with
> > Tomcat.
> > Check the Tomcat logs (your app logs AND catalina.out) and see if
> > anything shows up such as an exception.
> > Use Mozilla and get LiveHTTPHeaders. This will show you the raw URL
> > requests. Watch the JSESSIONID. Make sure the jvmRoute is appeneded to
> > the end of the session.. i.e. JSESSIONID=abcdef12345.myTomcat1. Make
> > sure the domain is being set right and that its not getting ignored. If
> > you're sending a cookie and then the response is giving you a new
> > cookie, its probably because of communication problems between Apache
> > and Tomcat.
> >
> > Paste relevant parts of your httpd.conf, workers.properties, and
> > server.xml if you still have trouble. Any helpful logs too...
> >
> > Cris
> >
> > -----Original Message-----
> > From: G. Wade Johnson [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 14, 2003 3:08 PM
> > To: Tomcat Users List
> > Subject: Re: Does load balancing with sticky sessions work with mod_jk?
> >
> > I've now compiled mod_jk 1.2.4 from source for Apache 1.3.28 under
> > Win32.
> >
> > My jvmRoute attributes exist and match the entries in workers.properties
> > for the appropriate hosts.
> >
> > I'm still showing my requests ping-ponging between the two servers.
> >
> > Can you think of anything else that I could be doing wrong?
> >
> > G. Wade
> >
> > Cristopher Daniluk wrote:
> > >
> > > Still advisable to compile the connector from source.
> > >
> > > Also maek sure your worker names in worker.properties match the names
> > > of the jvmRoute.
> > >
> > > -----Original Message-----
> > > From: G. Wade Johnson [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, August 14, 2003 11:29 AM
> > > To: Tomcat Users List
> > > Subject: Re: Does load balancing with sticky sessions work with
> > > mod_jk?
> > >
> > > Thanks for the response.
> > >
> > > I have the jvmRoute attribute set on both of my Tomcats.
> > >
> > > I am (unfortunately) running under Windows at the moment. From your
> > > response, I guess you are not. I'll see if I can compile the source.
> > >
> > > Thanks,
> > > G. Wade
> > >
> > > Cristopher Daniluk wrote:
> > > >
> > > > Make sure you set a jvmRoute and if you have trouble, compile the
> > > > mod_jk.so from src rather than using a binary.
> > > >
> > > > It works just fine...
> > > >
> > > > -----Original Message-----
> > > > From: G. Wade Johnson [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, August 14, 2003 10:56 AM
> > > > To: Tomcat Users List
> > > > Subject: Does load balancing with sticky sessions work with mod_jk?
> > > >
> > > > Has anyone gotten load balancing with stick sessions working with
> > > > Apache
> > > > 1.3.* and mod_jk?
> > > >
> > > > G. Wade
> > > >
> > > > --------------------------------------------------------------------
> > > > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > > --------------------------------------------------------------------
> > > > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to