users@glassfish.java.net

mod_proxy_ajp and chunked encoding

From: Cam Bazz <cambazz_at_gmail.com>
Date: Wed, 14 Mar 2012 17:03:17 +0200

Hello,

I configured my setup as described in
http://weblogs.java.net/blog/amyroh/archive/2012/02/15/running-glassfish-312-apache-http-server

No matter what I tried it would not work, and would give me some
errors, which I also posted to amy's blog.

Then I turned of the transfer encoding chunked to non chunked in http
listeners, and then it would work. We were using glassfish 3.0.1 in
production and very soon we will upgrade, but before upgrade we have
to resolve this problem. Is it ok to use non-chunked transfer encoding
in a real world production system?

Can we do any modifications to apache setup so it would work with
chunked encoding?

Any input in this matter is greatly appreciated.

Best Regards,
C.B.

PS: here are the errors I would get from jk log when transfer encoding
is chunked.

In mod_jk.log, I can see the web server receiving and sending data,
(debug data like: [Tue Mar 06 05:09:29 2012] [13852:1368479552]
[debug] ajp_connection_tcp_get_message::jk_ajp_common.c (1259): 0360
20 20 20 20 20 20 20 20 3C 6C 69 3E 3C 61 20 74 - ........<li><a.t)

[Tue Mar 06 05:09:29 2012] [13852:1368479552] [debug]
ws_write::mod_jk.c (506): written 3046 out of 3046
[Tue Mar 06 05:09:29 2012] [13852:1368479552] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1259): received from
ajp13 pos=0 len=6 max=8192
[Tue Mar 06 05:09:29 2012] [13852:1368479552] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1259): 0000 03 00 02
0D 0A 00 00 00 00 00 00 00 00 00 00 00 - ................
[Tue Mar 06 05:09:29 2012] [13852:1368479552] [debug]
ws_write::mod_jk.c (506): written 2 out of 2
[Tue Mar 06 05:09:29 2012] [13852:1368479552] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1259): received from
ajp13 pos=0 len=9 max=8192
[Tue Mar 06 05:09:29 2012] [13852:1368479552] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1259): 0000 03 00 05
30 0D 0A 0D 0A 00 00 00 00 00 00 00 00 - ...0............
[Tue Mar 06 05:09:29 2012] [13852:1368479552] [debug]
ws_write::mod_jk.c (506): written 5 out of 5
[Tue Mar 06 05:09:29 2012] [13852:1368479552] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1259): received from
ajp13 pos=0 len=2 max=8192
[Tue Mar 06 05:09:29 2012] [13852:1368479552] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1259): 0000 05 01 00
00 00 00 00 00 00 00 00 00 00 00 00 00 - ................
[Tue Mar 06 05:09:29 2012] [13852:1368479552] [debug]
ajp_process_callback::jk_ajp_common.c (1846): AJP13 protocol: Reuse is
OK
[Tue Mar 06 05:09:29 2012] [13852:1368479552] [debug]
ajp_reset_endpoint::jk_ajp_common.c (743): (worker1) resetting
endpoint with sd = 24
[Tue Mar 06 05:09:29 2012] [13852:1368479552] [debug]
ajp_done::jk_ajp_common.c (2905): recycling connection pool slot=0 for
worker worker1
[Tue Mar 06 05:09:29 2012] worker1 www.mysite.com 0.323120
[Tue Mar 06 05:09:29 2012] [13852:1368479552] [debug]
jk_handler::mod_jk.c (2599): Service finished with status=200 for
worker=worker1