You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2006/10/19 01:57:36 UTC

DO NOT REPLY [Bug 40792] New: - 500 error from Tomcat causes modjk lb worker to consider tomcat unusable for timeout period

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40792>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40792

           Summary: 500 error from Tomcat causes modjk lb worker to consider
                    tomcat unusable for timeout period
           Product: Tomcat 5
           Version: 5.5.15
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Native:JK
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: ken@i2rd.com


It seems that there is a bug in the error handling code in the lb worker.

I was using a modjk/tomcat configuration with a lb worker and two ajp13 workers.
One of the ajp13 workers was marked disabled and stopped.  The other tomcat
worker returned a 500 HTTP response for one user of the system.  This caused the
following log messages from modjk code:

[Mon Oct 16 13:39:16 2006] [info] ajp_process_callback::jk_ajp_common.c (1375):
Connection aborted or network problems
[Mon Oct 16 13:39:16 2006] [info] ajp_service::jk_ajp_common.c (1719): Receiving
from tomcat failed, because of client error without recovery
 in send loop 0
[Mon Oct 16 13:39:16 2006] [info] service::jk_lb_worker.c (677): unrecoverable
error 400, request failed. Client failed in the middle of requ
est, we can't recover to another instance.
[Mon Oct 16 13:39:16 2006] [info] jk_handler::mod_jk.c (1970): Aborting
connection for worker=lb

The error caused other users at the time to receive 503 error from apache
because modjk considered no workers to be OK. After awhile (about 1 minute)
modjk recognized that the Tomcat worker was ok and started working again.

In looking at the code, it appears that the problem might be that the worker's
busy flag is not cleared in this snippet of code:

(from jk_lb_worker.c: line 666 revision 1.89)
else if (service_stat == JK_CLIENT_ERROR) {
  /*
   * Clent error !!!
   * Since this is bad request do not fail over.
   */
  rec->s->errors++;
  rec->s->in_error_state = JK_FALSE;
  rec->s->in_recovering = JK_FALSE;
  rec->s->error_time = 0;
  *is_error = is_service_error;

  jk_log(l, JK_LOG_INFO,
       "unrecoverable error %d, request failed."
       " Client failed in the middle of request,"
                           " we can't recover to another instance.",
                           is_service_error);
       JK_TRACE_EXIT(l);
       return JK_CLIENT_ERROR;
 }

The JK_WORKER_IN_ERROR and JK_WORKER_USABLE macros check the is_busy flag so it
seems that not clearing it could cause a problem.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40792] - 500 error from Tomcat causes modjk lb worker to consider tomcat unusable for timeout period

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40792>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40792





------- Additional Comments From ken@i2rd.com  2006-10-19 07:21 -------
modjk 1.2.13

apache 2.0.55

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40792] - 500 error from Tomcat causes modjk lb worker to consider tomcat unusable for timeout period

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40792>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40792


rainer.jung@kippdata.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Additional Comments From rainer.jung@kippdata.de  2006-10-19 11:45 -------
Please update to 1.2.19. There have been a lot of bug fixes since 1.2.13.
If the bug can still be observed with 1.2.19 please reopen this ticket and I 
will investigate.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40792] - 500 error from Tomcat causes modjk lb worker to consider tomcat unusable for timeout period

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40792>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40792





------- Additional Comments From rainer.jung@kippdata.de  2006-10-18 21:28 -------
Which version of mod_jk?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org