You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Alexander Schwartz <al...@gmx.net> on 2004/02/12 23:33:34 UTC

Re: failover-problem and session mixup: jakarta-tomcat-connectors/mod_jk: jk_ajp_common.c

Am Mi, den 11.02.2004 schrieb Henri Gomez um 10:57:

> Ok, I commited changes in CVS which should fix problem in POST recovery.
> 
> Thanks to take a look at it

OK, POST recovery seems to work now in the scenario i have described:
Tomcat fails after receiving the request but before sending a reply.
POST data is recovered and resent to the other tomcat. Good!

I now have the trace I promised for the second challenge: tomcat fails
while sending data to the client. Here comes the test: 

  * set up two tomcats
  * use the extended EchoFilter.java that sends one byte 
    each second for ten seconds
  * send a request to the first one (take the login.html provided)
  * use "kill -9 [pid]" on the first one
  * see the following reply appearing in the window of your browser: 

---------------------------------------------
...HTTP/1.1 200 OK
Date: Thu, 12 Feb 2004 22:15:30 GMT
Server: Apache/1.3.29 (Debian GNU/Linux) PHP/4.3.3 mod_ssl/2.8.14 OpenSSL/0.9.7b mod_jk/1.2.6-dev
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Pragma: no-cache
Cache-Control: no-cache
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive, Keep-Alive
Transfer-Encoding: chunked, chunked
Content-Type: text/plain
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Pragma: no-cache
Cache-Control: no-cache

..........login=aaaa&pin=bbbb
---------------------------------------------

The first tomcat has been killed after three seconds (browser has
received the header and shows one dot per second). Then another header
and another body is sent to the browser and displayed -- the browser
accepts the second header as part of the body. 

If you would have used telnet to trigger the request you would have seen
two Headers. 

This is not specific to POST-Requests, the same is true for
GET-Requests. Do you still want to recover in this scenario?

Alex.

-- 
Alexander Schwartz (alexander.schwartz@gmx.net)
http://www.ahus1.de