Honestly, I've seen quite a few issues with advanced use cases with the AJP connector. If possible, I'd switch to a normal HTTP proxying setup and see if that helps at all.
Dan On Aug 3, 2012, at 4:51 PM, [email protected] wrote: > > Configuration: Apache CXF 2.3.2, Tomcat 6.0 with AJP connector and IIS 5.1 > > I am using Apache CXF to develop REST APIs for our application and all > integrations went smooth. However when I fire API on port 80 (default port > configured with ajp13 worked) , service() method of CXFServlet is being > invoked twice.This happens 80% of times but if there is a good amount of > delay between API calls (3-4 min) then I see a single invocation. > When I fire the API call on port 8080 (HTTP1.1 connector), just once call is > made to the servlet and that behavior is consistent. > > Apparently, this is just happening with the REST APIs and not with other > servlets in the application :(. > > The connector logs shows this error when request is being invoked twice: > > [Fri Aug 03 12:17:56.664 2012] [5308:1056] [trace] jk_connect.c (889): enter > [Fri Aug 03 12:17:56.680 2012] [5308:1056] [trace] jk_connect.c (918): exit > [Fri Aug 03 12:17:56.711 2012] [5308:1056] [debug] jk_ajp_common.c (1336): > received from ajp13 pos=0 len=4 max=8192 > [Fri Aug 03 12:17:56.727 2012] [5308:1056] [debug] jk_ajp_common.c (1336): > 0000 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ................ > [Fri Aug 03 12:17:56.758 2012] [5308:1056] [trace] jk_ajp_common.c (1340): > exit > [Fri Aug 03 12:17:56.774 2012] [5308:1056] [trace] jk_ajp_common.c (1781): > enter > *[Fri Aug 03 12:17:56.789 2012] [5308:1056] [debug] jk_ajp_common.c (1842): > Unexpected AJP13_SEND_BODY_CHUNK > [Fri Aug 03 12:17:56.821 2012] [5308:1056] [trace] jk_ajp_common.c (1845): > exit > [Fri Aug 03 12:17:56.836 2012] [5308:1056] [trace] jk_ajp_common.c (2168): > exit > [Fri Aug 03 12:17:56.852 2012] [5308:1056] [info] jk_ajp_common.c (2540): > (ajp13) sending request to tomcat failed (recoverable), because of server > error (attempt=1)* > [Fri Aug 03 12:17:56.883 2012] [5308:1056] [trace] jk_ajp_common.c (801): > enter > [Fri Aug 03 12:17:56.899 2012] [5308:1056] [trace] jk_connect.c (713): enter > [Fri Aug 03 12:17:56.914 2012] [5308:1056] [debug] jk_connect.c (722): About > to shutdown socket 2024 > [Fri Aug 03 12:17:56.946 2012] [5308:1056] [debug] jk_connect.c (803): > shutting down the read side of socket 2024 > [Fri Aug 03 12:17:56.961 2012] [5308:1056] [trace] jk_connect.c (650): enter > [Fri Aug 03 12:17:56.993 2012] [5308:1056] [trace] jk_connect.c (665): exit > [Fri Aug 03 12:17:57.008 2012] [5308:1056] [debug] jk_connect.c (813): > Shutdown socket 2024 and read 700 lingering bytes in 1 sec. > [Fri Aug 03 12:17:57.024 2012] [5308:1056] [trace] jk_connect.c (817): exit > [Fri Aug 03 12:17:57.039 2012] [5308:1056] [trace] jk_ajp_common.c (828): > exit > > full log: > http://cxf.547215.n5.nabble.com/file/n5712052/isapi_redirect_for_uses_api.log > isapi_redirect_for_uses_api.log > > After reading some forums I figured out that this error is throws if the > previoud request sends over some buffered response which does not adhere to > ajp protocol, hence connector throws this error. > This maybe a connector/tomcat bug, but since it just happens for CXF servlet > I was inquisitive if anyone has seen this problem before? > > Due to this my POST request are being invoked twice and breaks due to > duplicate items being created .. > > Any help/troubleshooting guidance would be appreciated! > > > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/Unexpected-AJP13-SEND-BODY-CHUNK-error-thrown-and-CXFServlet-invoked-twice-tp5712052.html > Sent from the cxf-user mailing list archive at Nabble.com. -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
