tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Gomez" <henri.go...@gmail.com>
Subject Re: More on i5/OS and some modifications needed
Date Tue, 24 Apr 2007 10:01:40 GMT
Ok, just add some log in mod_jk.c and see :

            if (rc > 0) {^M
                /* If tomcat returned no body and the status is not OK,^M
                   let apache handle the error code */^M
jk_log(xconf->log, JK_LOG_INFO, "sent_bodyct=%d status=%d
header_only=%d" , r->sent_bodyct, r->status, r->header_only);
                if (!r->sent_bodyct && r->status >= HTTP_BAD_REQUEST) {^M


SOAP reply (HTTP 200)

[Tue Apr 24 11:57:48 2007] [5833:0273] [debug] jk_ajp_common.c (1043):
received from ajp13 pos=0 len=4 max=8192
[Tue Apr 24 11:57:48 2007] [5833:0273] [debug] jk_ajp_common.c (1043):
0000    03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  -
................
[Tue Apr 24 11:57:48 2007] [5833:0273] [debug] jk_ajp_common.c (1043):
received from ajp13 pos=0 len=4 max=8192
[Tue Apr 24 11:57:48 2007] [5833:0273] [debug] jk_ajp_common.c (1043):
0000    03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  -
................
[Tue Apr 24 11:57:48 2007] [5833:0273] [debug] jk_ajp_common.c (1043):
received from ajp13 pos=0 len=2 max=8192
[Tue Apr 24 11:57:48 2007] [5833:0273] [debug] jk_ajp_common.c (1043):
0000    05 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00  -
................
[Tue Apr 24 11:57:48 2007] [5833:0273] [debug] jk_ajp_common.c (1506):
AJP13 protocol: Reuse is OK
[Tue Apr 24 11:57:48 2007] [5833:0273] [debug] jk_ajp_common.c (2286):
recycling connection pool slot=0 for worker soa-850
[Tue Apr 24 11:57:48 2007] [5833:0273] [info]  mod_jk.c (2224):
sent_bodyct=0 status=200 header_only=0
[Tue Apr 24 11:57:48 2007] [5833:0273] [debug] mod_jk.c (2233):
Service finished with status=200 for worker=soa-850

SOAP FAULT (HTTP 500)

[Tue Apr 24 11:55:27 2007] [5833:0024] [debug] jk_ajp_common.c (1043):
received from ajp13 pos=0 len=4 max=8192
[Tue Apr 24 11:55:27 2007] [5833:0024] [debug] jk_ajp_common.c (1043):
0000    03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  -
................
[Tue Apr 24 11:55:27 2007] [5833:0024] [debug] jk_ajp_common.c (1043):
received from ajp13 pos=0 len=4 max=8192
[Tue Apr 24 11:55:27 2007] [5833:0024] [debug] jk_ajp_common.c (1043):
0000    03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  -
................
[Tue Apr 24 11:55:27 2007] [5833:0024] [debug] jk_ajp_common.c (1043):
received from ajp13 pos=0 len=2 max=8192
[Tue Apr 24 11:55:27 2007] [5833:0024] [debug] jk_ajp_common.c (1043):
0000    05 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00  -
................
[Tue Apr 24 11:55:27 2007] [5833:0024] [debug] jk_ajp_common.c (1506):
AJP13 protocol: Reuse is OK
[Tue Apr 24 11:55:27 2007] [5833:0024] [debug] jk_ajp_common.c (2286):
recycling connection pool slot=0 for worker soa-850
[Tue Apr 24 11:55:27 2007] [5833:0024] [info]  mod_jk.c (2224):
sent_bodyct=0 status=500 header_only=0
[Tue Apr 24 11:55:27 2007] [5833:0024] [info]  mod_jk.c (2226): No
body with status=500 for worker=soa-850

It's strange but the sent_body is never set, so when HTTP 500 is
encountered, we think we got no BODY from Tomcat and fall back to
Apache 500 error.

Any idea ?

2007/4/24, Rainer Jung <rainer.jung@kippdata.de>:
> Hi Henri,
>
> > - Another annoying problem is the HTTP 500 error in SOAP mode. It
> > seems the sent_bodyct flag is not set in Apache 2 side, which is
> > strange since I got reply from Tomcat (HTTP 500 in HEADER and
> > SOAPFault in BODY).
> >
> > Since the sent_bodyct should be set inside Apache 2.x, it may be
> > something specific to i5/OS IBM implementation of Apache 2.0. I'm
> > still looking for informations from Rochester Labs.
> >
> > Do you know where the sent_bodyct is set in Apache 2.x, it will be
> > usefull to diagnose problem with IBMers ?
>
> include/httpd.h
>
> /** A structure that represents the current request */
> struct request_rec {
> ...
>     /** byte count in stream is for body */
>     apr_off_t sent_bodyct;
> ...
>
> Initialization in server/protocol.c:
>
> Value set to 0 in request_rec *ap_read_request(conn_rec *conn)
>
> During request processing the value gets set to 1 in
> modules/http/http_protocol.c.
>
> AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t
> *f, apr_bucket_brigade *b)
> ...
>     if (r->assbackwards) {
>         r->sent_bodyct = 1;
>         ap_remove_output_filter(f);
>         return ap_pass_brigade(f->next, b);
>     }
> ...
> (further equest processing)
> ...
>     if (r->header_only) {
>         apr_brigade_destroy(b);
>         ctx->headers_sent = 1;
>         return OK;
>     }
>
>     r->sent_bodyct = 1;   /* Whatever follows is real body stuff... */
> ...
>
> assbackwards is documented as:
>
>     /** HTTP/0.9, "simple" request (e.g. GET /foo\n w/no headers) */
>     int assbackwards;
>
> Regards,
>
> Rainer
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

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


Mime
View raw message