Re: Ajp13 wrong Response

2002-10-02 Thread Vince Clark

I found this post while researching the mail list archives for a problem 
I am having. The description Henri provides sounds exactly like what is 
happening with my application. I have included the original threads below.

Prior to reading this posting I had not come to Henri's conclusion:

Under certain conditions some request get the response for some other request

I was convinced my problem was related to how I was handling sessions, 
or how Tomcat recycles them. But I have exhausted all resources I can 
think of or find. This is the only thing I have found that comes close 
to my problem. I will admit upfront that I am no expert in Tomcat 
configuration.

Four or five users have contacted me with the same issue, which is 
basically that when they login to my app they see data intended for 
another user. Load is probably 40 to 50 concurrent users. I cannot 
reproduce the problem and it seems to be very isolated, with only a few 
occurences over the past week or so.

My environment is Red Hat Linux 7.2, Tomcat 3.3.1, Apache 1.3.22, 
Postgres 7.1.3. User authentication is performed against Postgres and 
userid is stored in a session attribute, along with a few other attributes.

In the 3.3.1 release notes bug 6234 was listed as resolved. I read the 
contents of the bug and tried the TestServlet you provided to reproduce 
the error. I still couldn't reproduce the problem which would make since 
if I am running a version of Tomcat that is supposed to include the fix. 
I also ran the TestServlet on 3.2.3 and couldn't reproduce. Although 
nothing indicates that the bug existed prior to 3.3.

In the TestServlet you indicate that the workaround is to use 
response.getOutputStream() instead of response.getWriter(). I am using 
getOutputStream().

I realize that I may not have the same problem but would appreciate any 
insight you could provide.


---Original Threads-

Actually, you don't need to load the system (that's the good news).  It's
not a synchronization problem.  It looks like it is a problem with error
handling, but I haven't tracked down where so I can't send a patch yet.  It
seems that when you get an error, the writer gets stuck in it's last
successful request and always sends that one.  I've reverted
HttpServletResponseFacade to always throwing away it's writer on recycle (so
that my developers can actually get work done)  as a stop-gap and that seems
to have made it go away.  Of course, this is far from ideal.  What you need
to start seeing this is something like:

public class BadServlet extends HttpServlet {

  protected void doGet(HttpServletRequest request, HttpServletResponse
response)
  throws ServletException, IOException {
 PrintWriter out = response.getWriter();
 out.println(Hello World);
 throw new IOException(Hi Mom!);
}
}
- Original Message -
From: GOMEZ Henri [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 03, 2001 7:45 AM
Subject: RE: Ajp13 wrong Response


 Very difficult to reproduce a situation under heavy load.
 I stressed my Apache/TC with ab during nigths without
 any failures but It was against simple servlets

 -
 Henri Gomez ___[_]
 EMAIL : [EMAIL PROTECTED](. .)
 PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
 PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6



 -Original Message-
 From: Angel Aray [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 03, 2001 2:46 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Ajp13 wrong Response
 
 
 
 I'll try that, but the problem I am seeing is with tomcat as late
 as TC 3.3-M3.
 
 -Original Message-
 From: GOMEZ Henri [mailto:[EMAIL PROTECTED]]
 Sent: Martes, 03 de Julio de 2001 04:10 a.m.
 To: [EMAIL PROTECTED]
 Subject: RE: Ajp13 wrong Response
 
 
  I am having a problem which is very difficult to reproduce.
 Under certain
  conditions some request get the response for some other
 request. It looks
  like at some point probably due to some synchronization
 issues tomcat
  mixes de responses from different clients.
 
 It was a known problem in early age of TC 3.3, with RequestDispatcher.
 Could you try a fresh install of TC 3.3-M4 ?
 
  I hadn't seen this behavior before, but since I moved  from
 using just
  tomcat to using apache + mod_jk + tomcat it has occurred a couple of
 times.
 
  Has anyone seen this kind of behavior before?
 
 
  I am using apache_1.3.20, tomcat33-m3.
 
 
 
  



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




Re: Ajp13 wrong Response

2002-10-02 Thread Henri Gomez

Vince Clark wrote:
 I found this post while researching the mail list archives for a problem 
 I am having. The description Henri provides sounds exactly like what is 
 happening with my application. I have included the original threads below.
 
 Prior to reading this posting I had not come to Henri's conclusion:
 
 Under certain conditions some request get the response for some other 
 request

Hum, it came from prehistory ;-)

With ajp13 and Tomcat 3.2.x, and should really be fixed with Tomcat 3.3.1.

i didn't see such behaviour for months



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




Re: Ajp13 wrong Response

2002-10-02 Thread Vince Clark

I have been turning over every stone I can find. Still no progress. I 
haven't ruled out a session problem but can't come up with a good way to 
reproduce the error. It would have to involve some way of accepting 
multiple cookies and making requests using each one.

Do you know of any good documentation on how TC recycles sessions? I 
read a posting on the comp.lang.java newsgroup that eluded to the 
possibility of session attributes persisting in sessions that time out 
and are recycled.

I also haven't ruled out a problem with my code, and it would make sense 
that this is where the problem lies since nobody else seems to be having 
any similar problems.


Henri Gomez wrote:

 Vince Clark wrote:

 I found this post while researching the mail list archives for a 
 problem I am having. The description Henri provides sounds exactly 
 like what is happening with my application. I have included the 
 original threads below.

 Prior to reading this posting I had not come to Henri's conclusion:

 Under certain conditions some request get the response for some 
 other request


 Hum, it came from prehistory ;-)

 With ajp13 and Tomcat 3.2.x, and should really be fixed with Tomcat 
 3.3.1.

 i didn't see such behaviour for months



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


-- 
Vince Clark
Global Era, LLC
Software, Database, and Web Solutions
(303)433-4221 office
(303)455-2409 fax
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
www.globalera.net




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




RE: [PATCH] Ajp13 wrong Response

2001-07-18 Thread Mike Anderson

Henri,

Check what I just checked in to TC3.3.  I'm pretty sure it is a more comprehensive fix 
for the same issue.  We had seen this internally and needed a fix for it and so I just 
committed my fix.

Mike Anderson

 [EMAIL PROTECTED] 07/10/01 01:58AM 
I'll study carefully this one to see if he didn't 
broke the recovery stuff added to handle case
where tomcat is restarted...

Thanks

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



-Original Message-
From: William Barker [mailto:[EMAIL PROTECTED]] 
Sent: Monday, July 09, 2001 8:58 PM
To: [EMAIL PROTECTED] 
Subject: [PATCH] Ajp13 wrong Response


This fixes the problem reported by Angel Aray in thread 23795. 
 The diff is
against TC3.3 M4.  What was happening is that the user hitting 
the stop
button in the browser was invoking the re-try broken 
connection logic.  This
totally freaks out the proxy server who now thinks that the 
re-sent page is
actually the page for a different request.





RE: [PATCH] Ajp13 wrong Response

2001-07-10 Thread GOMEZ Henri

I'll study carefully this one to see if he didn't 
broke the recovery stuff added to handle case
where tomcat is restarted...

Thanks

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



-Original Message-
From: William Barker [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 8:58 PM
To: [EMAIL PROTECTED]
Subject: [PATCH] Ajp13 wrong Response


This fixes the problem reported by Angel Aray in thread 23795. 
 The diff is
against TC3.3 M4.  What was happening is that the user hitting 
the stop
button in the browser was invoking the re-try broken 
connection logic.  This
totally freaks out the proxy server who now thinks that the 
re-sent page is
actually the page for a different request.




[PATCH] Ajp13 wrong Response

2001-07-09 Thread William Barker

This fixes the problem reported by Angel Aray in thread 23795.  The diff is
against TC3.3 M4.  What was happening is that the user hitting the stop
button in the browser was invoking the re-try broken connection logic.  This
totally freaks out the proxy server who now thinks that the re-sent page is
actually the page for a different request.

 jk_ajp13_worker.diff


RE: Ajp13 wrong Response

2001-07-03 Thread GOMEZ Henri

 I am having a problem which is very difficult to reproduce. 
Under certain
 conditions some request get the response for some other 
request. It looks
 like at some point probably due to some synchronization issues tomcat
 mixes de responses from different clients.

It was a known problem in early age of TC 3.3, with RequestDispatcher.
Could you try a fresh install of TC 3.3-M4 ?

 I hadn't seen this behavior before, but since I moved  from 
using just
 tomcat to using apache + mod_jk + tomcat it has occurred a couple of
times.

 Has anyone seen this kind of behavior before?


 I am using apache_1.3.20, tomcat33-m3.






RE: Ajp13 wrong Response

2001-07-03 Thread Angel Aray

I am seeing the problem appears almost on a daily basis with
very little traffic. When the 3 people who use the system (consisting
of 3 html forms and 3 servlets) happen to hit submit roughtly at the same
time
the problems appears.

Once the problems appears we start to get mixed responses very frequently
and the only solutions is to restart tomcat to get it back to a good state.

Another, questions how would you know that ab is getting the right response.
Let say your simple servlet just echo some information extracted from the
httpRequest. Using ab everything would seem to be working, all request
would get back some apparently good response.



-Original Message-
From: GOMEZ Henri [mailto:[EMAIL PROTECTED]]
Sent: Martes, 03 de Julio de 2001 10:45 a.m.
To: [EMAIL PROTECTED]
Subject: RE: Ajp13 wrong Response


Very difficult to reproduce a situation under heavy load.
I stressed my Apache/TC with ab during nigths without
any failures but It was against simple servlets

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .)
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6



-Original Message-
From: Angel Aray [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 03, 2001 2:46 PM
To: [EMAIL PROTECTED]
Subject: RE: Ajp13 wrong Response



I'll try that, but the problem I am seeing is with tomcat as late
as TC 3.3-M3.

-Original Message-
From: GOMEZ Henri [mailto:[EMAIL PROTECTED]]
Sent: Martes, 03 de Julio de 2001 04:10 a.m.
To: [EMAIL PROTECTED]
Subject: RE: Ajp13 wrong Response


 I am having a problem which is very difficult to reproduce.
Under certain
 conditions some request get the response for some other
request. It looks
 like at some point probably due to some synchronization
issues tomcat
 mixes de responses from different clients.

It was a known problem in early age of TC 3.3, with RequestDispatcher.
Could you try a fresh install of TC 3.3-M4 ?

 I hadn't seen this behavior before, but since I moved  from
using just
 tomcat to using apache + mod_jk + tomcat it has occurred a couple of
times.

 Has anyone seen this kind of behavior before?


 I am using apache_1.3.20, tomcat33-m3.








Re: Ajp13 wrong Response

2001-07-02 Thread Bill Barker

I take back my previous post.  This is still happening in M4 (and I'm still
clueless why).
- Original Message -
From: Angel Aray [EMAIL PROTECTED]
To: 'Tomcat-Dev [EMAIL PROTECTED]
Sent: Friday, June 29, 2001 4:29 PM
Subject: Ajp13 wrong Response



 I am having a problem which is very difficult to reproduce. Under certain
 conditions some request get the response for some other request. It looks
 like at some point probably due to some synchronization issues tomcat
 mixes de responses from different clients.

 I hadn't seen this behavior before, but since I moved  from using just
 tomcat to using apache + mod_jk + tomcat it has occurred a couple of
times.

 Has anyone seen this kind of behavior before?


 I am using apache_1.3.20, tomcat33-m3.






Re: Re: Ajp13 wrong Response

2001-07-01 Thread mark.abbott

Regarding email from Bill Barker on Jun 29 18:35:






Ajp13 wrong Response

2001-06-29 Thread Angel Aray


I am having a problem which is very difficult to reproduce. Under certain
conditions some request get the response for some other request. It looks
like at some point probably due to some synchronization issues tomcat
mixes de responses from different clients.

I hadn't seen this behavior before, but since I moved  from using just
tomcat to using apache + mod_jk + tomcat it has occurred a couple of times.

Has anyone seen this kind of behavior before?


I am using apache_1.3.20, tomcat33-m3.




Re: Ajp13 wrong Response

2001-06-29 Thread Bill Barker

I've seen it, but couldn't track it down.  I haven't seen it come back in
M4, but haven't been testing M4 long either.
- Original Message -
From: Angel Aray [EMAIL PROTECTED]
To: 'Tomcat-Dev [EMAIL PROTECTED]
Sent: Friday, June 29, 2001 4:29 PM
Subject: Ajp13 wrong Response



 I am having a problem which is very difficult to reproduce. Under certain
 conditions some request get the response for some other request. It looks
 like at some point probably due to some synchronization issues tomcat
 mixes de responses from different clients.

 I hadn't seen this behavior before, but since I moved  from using just
 tomcat to using apache + mod_jk + tomcat it has occurred a couple of
times.

 Has anyone seen this kind of behavior before?


 I am using apache_1.3.20, tomcat33-m3.