tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Meadows" <jakarta.a...@meadowsdesign.cc>
Subject Re: Tomcat losing session
Date Tue, 14 Jan 2003 21:48:34 GMT
I had a problem with session values and name resolution.  It turns out that
an underscore in one of the machine names was messing up the session lookup.
My "guess" was that it has something to do with some name mangling way down
inside the Java internals (problem existed with other containers, not just
tomcat).

However, this problem was persistant in that once it showed up it would not
go away and subsequently every request resulted in a new session.  Might be
a starting point though because the same code worked at one point and then
just stopped.

Andy



----- Original Message -----
From: "Charlie Toohey" <ctoohey@pacbell.net>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Tuesday, January 14, 2003 4:24 PM
Subject: Re: Tomcat losing session


> Thanks. However, I am writing the cookie value to the log, and the cookie
> value is identical for subsequent requests, yet Tomcat creates a new
session
> on each request. So it looks like it is parsing the headers correctly.
>
>
> > I had a problem recently with a browser not setting Content-type
correctly.
> >  If the Content-type is note set correctly, Tomcat can't parse the HTTP
> > headers (including the cookie), so it'll create a new one.
> >
> >
> > Charlie Toohey wrote:
> > > Infrequently, Tomcat is creating a new session on each request from
the
> > > same cookie, when all of the requests should be in the same session.
> > >
> > > I am logging the cookie and session ids to debug this. What I see is
that
> > > a request comes in with cookie JSESSIONID=X. Tomcat creates a new
> > > session, with session id=Y. Then, another request comes in from the
same
> > > client, and cookie value JSESSIONID=X (still). Tomcat creates a new
> > > session again, with session id=Z.
> > >
> > > What happens most of the time is that client request comes in with
cookie
> > > value JSESSIONID=X, and Tomcat creates a new session with session id =
Y.
> > > When another request comes in from the same client, cookie value
> > > JSESSIONID now = Y, and Tomcat session id is Y. As expected.
> > >
> > > The same requests can produce the two different scenarios, so it does
not
> > > appear to be specific to the resource which is requested.  But there
are
> > > more specifics --- when this happens, the first resource requested in
the
> > > session is a servlet, which does a sendRedirect, resulting in the
> > > request. I don't know if there is something about this sequence that
> > > could cause the problem.
> > >
> > > As I said, this happens very infrequently, and can not be reproduced
at
> > > will. When it does happen, it happens on every request from the client
> > > --- every request receives the same cookie JSESSIONID value, but
creates
> > > a new session. It's like once it gets into that mode, it can't get
out.
> > >
> > > Has anyone else ever experience this behavior of losing sessions ?
> > >
> > > We are using Tomcat 4.1.12 with Apache 1.3.27 running on Mandrake
Linux
> > > 8.1.
> > >
> > > Thanks for any help,
> > > Charlie
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > <mailto:tomcat-user-unsubscribe@jakarta.apache.org> For additional
> > > commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message