httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: [users@httpd] AJP Errors?
Date Tue, 26 Aug 2014 08:37:12 GMT
Hi Burton,

Am 25.08.2014 um 22:14 schrieb Smith, Burton:
> Can someone tell me about this error set?  They show up in the
> Apache(mod_jk) log.  They may or may not indicate that one node is
> down.  I would like to know how to differentiate between a recoverable
> and a non-recoverable issue so that 24x7 support can monitor the issue.
> My Apache version is 2.2.15 if that helps.
>
> [error] ajp_connect_to_endpoint::jk_ajp_common.c (1026): (103t1)
> cping/cpong after connecting to the backend server failed (errno=110)
>
> [error] ajp_send_request::jk_ajp_common.c (1630): (103t1) connecting to
> backend failed. Tomcat is probably not started or is listening on the
> wrong port (errno=110)
>
> [info] ajp_service::jk_ajp_common.c (2623): (103t1) sending request to
> tomcat failed (recoverable), because of error during request sending
> (attempt=1)
>
> [error] ajp_connect_to_endpoint::jk_ajp_common.c (1026): (103t1)
> cping/cpong after connecting to the backend server failed (errno=110)
>
> [error] ajp_send_request::jk_ajp_common.c (1630): (103t1) connecting to
> backend failed. Tomcat is probably not started or is listening on the
> wrong port (errno=110)
>
> [info] ajp_service::jk_ajp_common.c (2623): (103t1) sending request to
> tomcat failed (recoverable), because of error during request sending
> (attempt=1)

First: Since your Apache version 2.2.15 is pretty old and mod_jk had 
many improvements in the last years, I suggest that you check your 
mod_jk version and consider upgrading to latest.

"recoverable" means mod_jk will send the same request again. If mod_jk 
has already send part of the request to Tomcat and doesn't get back a 
response or something breaks while sending the request, it decides on 
the type of request and config, whether it is allowed to send the same 
request again.

Consider a final request in some flow ordering stuff from a shop. mod_jk 
might have send the request and an error happens when trying to read the 
response. Should it then send the request again or not?

You can influence behavior using the ajp13 worker config property 
recovery_options, which is a bit mask. Look for "recovery_options" in 
the docs:

http://tomcat.apache.org/connectors-doc/reference/workers.html

Often value "31" (all available bits set) is appropriate, but it depends 
on the application.

Using cping/cpong is nice, because it checks the connection before 
mod_jk tries to send the request. So if cping/cpong fails it is clear, 
that mod_jk can always retry, because Tomcat hasn't received any part of 
the request yet.

The number of retries mod_jk will use for a worker is also configurable, 
by default "2", property "retries" on an ajp13 worker, see the same docs 
page.

If all retries fail, then it will try a fail over (for a recoverable 
request), but often a failover will work on the http level, but not on 
the application level, because e.g. a web session on one Tomcat doesn't
exist on the failover Tomcat (without adding session replication).

Log messages:

- a load balancer worker will log after an unrecoverable failure:

   "unrecoverable error XXX, request failed. Tomcat failed in the middle 
of request, we can't recover to another instance.", where XX is a number.

The message will be marked with [error]

- an AJP13 worker can log several message containing "recoverable" or 
"unrecoverable". I'll list them here based on the current version. RRR 
will either be the strings "recoverable" or "unrecoverable", SSS a 
socket number, EEE an error number:

[info]: "(WORKERNAME) failed sending request (RRR) "
                    "(errno=EEE)",

[error]: "(WORKERNAME) failed sending request on a fresh connection 
(RRR), socket SSS (errno=EEE)",

[error]: "(WORKERNAME) failed sending request body of size LLL (RRR), "
                    "socket SSS (errno=EEE)",

[error]: "(WORKERNAME) failed sending request body of size LLL (lb mode) 
(RRR), socket SSS (errno=EEE)",

[error]: "(WORKERNAME) unexpected condition err=EEE recoverable=%d",

[error]: "(WORKERNAME) sending request to tomcat failed (unrecoverable), 
%s (attempt=%d)",

[info]: "(WORKERNAME) sending request to tomcat failed (RRR), %s 
(attempt=%d)",

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message