Hello Henri, hello mod_jk-Developers,
Am Di, den 27.01.2004 schrieb Henri Gomez um 18:00:
> > we are currently experiencing some problems with mod_jk with
> > loadbalancing:
> >
> > (A) when a post-request fails while receiving data from tomcat, the
> > loadbalancer tries to send the request to the other tomcat, but
> > "forgets" the post body content (i.e. login and password submitted by
> > the user). The size of the body content is only a few bytes (< 100), so
> > it's not the "known" problem with bodies longer than 8k.
> >
> > (B) it seems that sometimes after a POST-failover body data from an
> > old request is sent to the other tomcat when the first connection
> > failed. This leads to a session mix-up & user mix-up!
[...]
> It used to works but it was before the content-header add-on code.
>
> This piece of is a nightmare, and I see no easier solution than copying
> the HEAD+POST in temp buffer but I'd like to have Bill, Mladen and JFC
> advices...
I'd really like to use mod_jk open source software in our production
environment, but I need to make sure it's strong enough for production.
I need some advice on the two issues (as far as I can see there has been
no commit on CVS and/or discussion results)
* do you think the POST-recovery caused the session mix-up?
* does our patch successfully eliminate the problem by disabling
POST-recovery?
The patch is attached.
Thanks a lot,
Alexander.
--
Alexander Schwartz ([EMAIL PROTECTED])
http://www.ahus1.de
--- jk_ajp_common.c.old Fri Jan 23 16:26:12 2004
+++ jk_ajp_common.c Fri Jan 23 16:28:02 2004
@@ -963,10 +963,16 @@
* or Tomcat crashed. In any case we cannot recover this.
*/
+ // as+gj/20040123: we don't want to try the buggy POST recovery as it
+ // seems to repost buggy data
+ // BUT: doesn't work!
+ // op->recoverable = JK_FALSE;
+
jk_log(l, JK_LOG_DEBUG,
"ajp_send_request 2: "
- "request body to send %d - request body to resend %d\n",
- ae->left_bytes_to_send, jk_b_get_len(op->reply) - AJP_HEADER_LEN);
+ "request body to send %d - request body to resend %d/%d\n",
+ ae->left_bytes_to_send, jk_b_get_len(op->reply) - AJP_HEADER_LEN,
+ jk_b_get_len(op->post) - AJP_HEADER_LEN);
/*
* POST recovery job is done here.
@@ -977,10 +983,18 @@
* remote Tomcat
*/
if (jk_b_get_len(op->post) > AJP_HEADER_LEN) {
- if(!ajp_connection_tcp_send_message(ae, op->post, l)) {
- jk_log(l, JK_LOG_ERROR, "Error resending request body\n");
- return JK_FALSE;
- }
+ // as+gj/20040123: seems to be buggy, doesn't fit the debug output
+ // above, customers complain about seeing wrong user's data when doing
+ // a login-POST
+ // if(!ajp_connection_tcp_send_message(ae, op->post, l)) {
+ // jk_log(l, JK_LOG_ERROR, "Error resending request body\n");
+ // return JK_FALSE;
+ // }
+
+ // as+gj/20040123 recovery is disabled above shoudn't happen!
+ jk_log(l, JK_LOG_ERROR, "Shouldn't be here resending request body! (as+gj/20040123)\n");
+ op->recoverable = JK_FALSE;
+ return JK_FALSE;
}
else {
/* We never sent any POST data and we check if we have to send at
@@ -1009,6 +1023,8 @@
s->content_read = len;
if (!ajp_connection_tcp_send_message(ae, op->post, l)) {
jk_log(l, JK_LOG_ERROR, "Error sending request body\n");
+ // as+gj/20040123
+ op->recoverable = JK_FALSE;
return JK_FALSE;
}
}
@@ -1279,6 +1295,9 @@
* receiving upload data and we must consider that
* operation is no more recoverable
*/
+ // as+gj/20040123:
+ // don't want to recover
+ op->recoverable = JK_FALSE;
if (! op->recoverable) {
*is_recoverable_error = JK_FALSE;
jk_log(l, JK_LOG_ERROR,
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]