Greetings.
Having a problem with mod_jk2 in some instances. Am hoping someone has some
sort of feedback as to what could be causing it.
Right the scenario:
WinXP Pro
Apache 2.0.49 (with the WinSock2 API disabled - same even with it enabled)
Tomcat 5.0.19
mod_jk2/2.02
The JSP:
A JSP page with a large amount of processing and/or generating a large
amount of HTML to return to the client. The processing is mostly handled
with custom tags on the JSP page. the output uses tables for positioning of
the returning data - and in the offending JSP(s) there is a fair amount of
processing that occurs while builiding the output buffer (note that we are
buffering te output before sending it back to the client.
The problems that occur:
When running through Apache (mod_jk2) to the JSP page all works fine on a
number of JSP pages. At a certain point (always the JSP described above)
the output that is generated from the request is REALLY messed up! Below is
a chunk of the HTML that is returned from the request (sorry it is ugly!):
========= BROKEN OUTPUT CHUNK ===========
<input type="text" name="materialQty_52" tabindex="3" onblur="setZero(this)"
onkeyup="alterValues(52, false)" value="1" size="5">
</td>
<td>$<input class="readonlyinputs" type="text" readonl ÈðXT€
ð*‚8 X % ! ` H Ðr&¤ÇÂ
|"Ë+Á ºIÁÝ.ÄðE{&¤Ç j 0 p
T ×$ Ðr&¤Ç |"Ë+Á@(protected)
e x c e l . x l s € H @
1Ÿ 5‚ÿÿÿÿ‚yG
!
!FILE0 ;‰Ç 8 X % ! ` H
¢s&¤Ç |"Ë+ÁàCÁÝ.ÄÀ¾y&¤Ç j
0 p V ×$ ¢s&¤Ç |"Ë+Á Ó¡ÇÂÀ¾y&¤Ç Ú
a m i p r o . s a m € H @ Ú
Ú 1Ñ 5‚ÿÿÿÿ‚yG
!
!FILE0 ’†Ç 8 ð % ! ` H
¢s&¤ÇÂðþ2¤ÇÂÀr:ÁÝ.Ä %¢y”'Ä j
0 x Z Ù$ ¢s&¤ÇÂ0(°?¢ÇÂ0(°?¢ÇÂÀ¾y&¤ÇÂ
W I N D O W ~ 1 . L N K a P 0 r Ù$
¢s&¤ÇÂ0(°?¢ÇÂ0(°?¢ÇÂÀ¾y&¤Ç W i n d o w s M e
d i a P l a y e r . l n k € H @
1ÏJ 5‚ÿÿÿÿ‚yG !
!FILE0 ƒv%& 8 € % ! ` H
¢s&¤ÇÂÐbšG¢ÇÂ`d7ÁÝ.Ä 4Ä& j
0 p X Ú$ ¢s&¤ÇÂÐbšG¢ÇÂÐbšG¢ÇÂ0)u&¤ÇÂX T
& d e s k t o p . i n i € p T [.ShellClassInfo]
LocalizedResourceName=@(protected)
ÿÿÿÿ‚yG
!
!FILE0 ÊzÇ ð*‚8 è % ë ` H
€Û&¤ÇÂØéG¢Ç ãÁÝ.Ä@(protected)
0 x Z Ù$ €Û&¤ÇÂØéG¢ÇÂØéG¢Çª&¤Ç ?
R E M O T E ~ 1 . L N K t a n 0 ˆ l Ù$
€Û&¤ÇÂØéG¢ÇÂØéG¢Çª&¤Ç ? R e m o t e A s
s i s t a n c e . l n k € H @
? ? 1Ç 5‚ÿÿÿÿ‚yG ë
ë FILE0 ³tÇ 8 è % ë ` H
€Û&¤ÇÂ°š €”'ÄÀŒ ÁÝ.İNœ¿˜'Ä j
0 x Z Û$ €Û&¤Ç°†(ơǰ†(Æ¡ÇÂäœ&¤Ç Ï
W I N D O W ~ 1 . L N K o r e 0 ˆ j Û$
€Û&¤Ç°†(ơǰ†(Æ¡ÇÂäœ&¤ÇÂ Ï W i n d o w s E
x p l o r e r . l n k € H @
Ï Ï 1Y y‚ÿÿÿÿ‚yG ë
ë FILE0 Çv%& 8 8
% ë ln ` H €Û&¤ÇÂðþ2¤ÇÂð ÁÝ.Ä 4Ä&
j 0 p X Ù$
€Û&¤ÇÂØéG¢ÇÂØéG¢Ç€Û&¤ÇÂÐ Î & d e s k t o p . i n
i € (
[.ShellClassInfo]
LocalizedResourceName=@(protected)
[LocalizedFileNames]
Windows Media Player.lnk=@(protected)
Remote Assistance.lnk=@(protected)
Outlook Express.ë k=@(protected)
ÿÿÿÿ‚yG
ë FILE0 6sÇ 8 à % ë ` H
€Û&¤ÇÂ&WG¢ÇÂÁÝ.Ä@(protected)
0 x Z Û$ €Û&¤ÇÂ&WG¢ÇÂ&WG¢Ç°ՙ&¤Ç ÷
T O U R W I ~ 1 . L N K X P 0 € h Û$
€Û&¤ÇÂ&WG¢ÇÂ&WG¢Ç°ՙ&¤Ç ÷ T o u r W i n d
o w s X P . l n k € H @ ÷
÷ 1ß 5‚ÿÿÿÿ‚yG ë
<input type="text" name="materialQty_59" tabindex="10"
onblur="setZero(this)" onkeyup="alterValues(59, false)" value="0" size="5">
</td>
========= END BROKEN OUTPUT CHUNK ===========
In addition, the HTTP headers are also being written out to the content on
the above JSP (as follows) after another batch of similar to above. One
this that is interesting is if you look at the chunk below, you will see
that there are <Context /> blocks being written to the HTML!! Also these
<Context /> blocks are for OTHER sites runnin on the same server (same
Apache different Virtual Hosts, same Tomcat, differnet hosts). Note that
all the sites are using the same AJP Connector in the jk comms (the uri
mounts are done in the Apache VirtualHosts blocks using JkUriSet directives
within nested <Location /> blocks. Anyway, the other messed output chunk:
========= HTTP HEADER CHUNK =================
<td>
<input type="text" name="materialQty_66" tabindex="17"
onblur="setZero(this)" onkeyup="alterValues(66, falseRCRD( ö¡%& pì
° Ý¡%& S Ä Ä 8 0 (Ÿ pÍH}4Ä
`ºÅ2Ä %&
øŸ%& øŸ%& ˜ ( 8 ` 8 ð ¿“!
àÆ`Äp™Ê`Äp™Ê`ÄpÍH}4Ä
àÆ`Äp™Ê`Äp™Ê`Ä`ºÅ2Ä 0 %& %&
%& ˜ ( 8 ` 8 X ¿“!
àÆ`Äp™Ê`Äp™Ê`ÄpÍH}4Ä S
àÆ`Äp™Ê`Äp™Ê`Ä`ºÅ2Ä I %& 0 %&
( ( ( T %&
ˆ ( 0 X 0 8 0 ó b¬ ÐÛK}4Ä
À‚ºÅ2Ä k %&
T %& T %& ˜ ( 8 ` 8 @ ¾“!
°¿U_ÄÐ8Û€|ÄÐ8Û€|ÄÐÛK}4Ä
°¿U_ÄÐ8Û€|ÄÐ8Û€|SÀ‚ºÅ2Ä „ %& k %& k
%& ˜ ( 8 ` 8 ¨ ¾“!
°¿U_ÄÐ8Û€|ÄÐ8Û€|ÄÐÛK}4Ä
°¿U_ÄÐ8Û€|ÄÐ8Û€|ÄÀ‚ºÅ2Ä %& „ %&
( ( ( ¨ %&
ˆ ( 0 X 0 8 0 ¹ rX! @¹_}4Ä
°AŠºÅ2Ä ¿ %&
S¨ %& ¨ %& ˜ ( 8 ` 8 0 X
ÆÖ 0¢]jÄpøojÄpøojÄ@(protected)
0¢]jÄpøojÄpøojİAŠºÅ2Ä Ø %& ¿ %& ¿
%& ˜ ( 8 ` 8 0 À ÆÖ
0¢]jÄpøojÄpøojÄ@(protected)
0¢]jÄpøojÄpøojİAŠºÅ2Ä ñ %& Ø %&
( ( ( ü %&
ˆ S ( 0 X 0 8 0 Ξ ÐNd}4Ä
àÈ‹ºÅ2Ä ¡%&
ü %& ü %& ˜ ( 8 ` 8 Ð ¾“!
¼¦_ÄжÀ_ÄжÀ_ÄÐNd}4Ä
¼¦_ÄжÀ_ÄжÀ_Ä š±¿2Ä ,¡%& ¡%& ¡%&
˜ ( 8 ` 8 8 ¾“!
¼¦_ÄжÀ_ÄжÀ_ÄÐNd}4Ä
¼¦_ÄжÀ_SжÀ_Ä š±¿2Ä E¡%& ,¡%&
( ( ( P¡%&
ˆ ( 0 X 0 8 0 ÿ $Ÿ 0]g}4Ä
PºÅ2Ä g¡%&
P¡%& P¡%& ˜ ( 8 ` 8 è ¾“!
`W¡`ÄPû¨`ÄPû¨`Ä0]g}4Ä
`W¡`ÄPû¨`ÄPû¨`ÄPºÅ2Ä S€¡%& g¡%&
( ( ( 4hî‹¡%&
ˆ ( 0 X 0 8 0 v¬ Þ‚}4Ä
pѨºÅ2Ä ¢¡%&
‹¡%& ‹¡%& ˜ ( 8 ` 8 x ¾“!
°Ÿ_Ä ¼¦_Ä ¼¦_ÄÞ‚}4Ä °Ÿ_Ä ¼¦_Ä
¼¦_ÄpѨºÅ2Ä »¡%& ¢¡%& (
S ( ( Æ¡%& ˆ
( / X / 8 1 %Ÿ }4Ä
®¼ºÅ2Ä Ý¡%&
Æ¡%& Æ¡%& ˜ ( 8 ` 8 ¿“!
Pû¨`İ|Ä`İ|Ä`Äà}4Ä
Pû¨`İ|Ä`İ|Ä`Ä஼ºÅ2Ä ö¡%& Ý¡%&
( ( ( SRCRD( ï£%&
pì x Ø£%& T8 Ä Ä 8 Ä ¢%&
ˆ ( 0 X 0 8 0 Úž 0C˜}4Ä
ÐÅܺÅ2Ä ¢%&
¢%& ¢%& ˜ ( 8 ` 8 ¾“!
жÀ_İþÏ_İþÏ_Ä0C˜}4Ä
жÀ_İþÏ_İþÏ_ÄÐÅܺÅ2Ä 9¢%& ¢%&
¢%& ˜ ( T` 8 ¾“!
жÀ_İþÏ_İþÏ_Ä0C˜}4Ä
жÀ_İþÏ_İþÏ_ÄÐÅܺÅ2Ä R¢%& 9¢%&
( ( ( ]¢%&
ˆ ( 0 X 0 8 0 7 ‰¬ Q›}4Ä
xçºÅ2Ä t¢%&
]¢%& ]¢%& ˜ ( 8 ` 8 Ð ¾“!
08Ü_T°qè_İqè_ÄQ›}4Ä
08Ü_İqè_İqè_Ä xçºÅ2Ä ¢%& t¢%&
( ( ( 4h%&
ˆ ( 0 X 0 8 0 Ï L« °|¤}4Ä
ÀÜüºÅ2Ä ¯¢%&
˜¢%& ˜¢%& ˜ ( 8 ` 8 `@ ˜ ¶“!
0°tWİé€Wİé€Wİ|¤}4Ä T
0°tWİé€Wİé€WÄÀÜüºÅ2Ä È¢%& ¯¢%&
( ( ( 4hîÓ¢%&
ˆ ( 0 X 0 8 0 ´ 1ª à¦}4Ä
ÀÜüºÅ2Ä ê¢%&
Ó¢%& Ó¢%& ˜ ( 8 ` 8 ´ ´“!
ºaTÄ€qTÄ€qTÄà¦}4Ä
ºaTÄ€qTÄ€qTÄÀÜüºÅ2T £%& ê¢%& ê¢%&
˜ ( 8 ` 8 ´ ´“!
ºaTÄ€qTÄ€qTÄà¦}4Ä
ºaTÄ€qTÄ€qTÄÀÜüºÅ2Ä £%& £%&
( ( ( DhîŽ*W€'£%&
ˆ ( 0 X 0 8 0 — ª4 p™ª}4Ä
Pr»Å2Ä >£%&
'£%& T'£%& ˜ ( 8 ` 8 ´ @ ´“!
²DTÄ%]TÄ%]TÄp™ª}4Ä
²DTÄ%]TÄ%]TÄPr»Å2Ä W£%& >£%&
( ( ( b£%&
ˆ ( 0 X 0 8 0 û xª ðÒ¶}4Ä
0º»Å2Ä y£%&
b£%& b£%& ˜ ( T` 8 ø ” §4
àUÄàUÄàUÄðÒ¶}4Ä
àUÄàUÄàUÄ€ù»Å2Ä ’£%& y£%&
( ( ( 4hî£%&
ˆ ( 0 X 0 8 0 û xª °ï¼}4Ä
0º»Å2Ä ´£%&
£%& £%& ˜ ( 8 ` 8 @(protected)
àUTÐY`aÄÐY`aİï¼}4Ä
àUÄÐY`aÄÐY`aÄ@(protected)£%& ´£%&
( ( ( أ%&
ˆ ( 0 X 0 8 0 8Ÿ “Ä}4Ä
0º»Å2Ä ï£%&
Ø£%& Ø£%& ` ( , X Ô_
h9á" Àÿÿÿÿ W íW Ø£%& <script> °ÎðXT€
@÷8 ` V B ` H
€åe{Ä0Æ…Å2Ä0Æ…Å2Ä@(protected)
x Z V €åe{Ä€åe{Ä€åe{Ä€åe{Ä
t l d C a c h e . s e r € H , ¬í ur
[Ljava.lang.String;ÒVçé{G xp ‚yGÿÿÿÿ‚yG
B
B FILE0 Ö&& 8 @ ‘V B ` H
À;$e{ÄÀ;$e{ÄÀ;$e{Ä€ ;¨4Ä
0 p X b À;$e{ÄÀ;$e{ÄÀ;$e{ÄÀ;$e{Ä
W W W I N T ~ 1 . 0 1 0 x ` b
À;$e{ÄÀ;$e{ÄÀ;$e{ÄÀ;$e{Ä w w w . i n t r a
n e t . 0 1 ¸ ˜ $ I 3 0 0 ˆ ˆ
’V h R ‘V À;$e{ÄIö§4ÄIö§4ÄIö§4Äh B f
R O O T . x m l ÿÿÿÿ‚yG
B FILE0 ´&& 8 ’V B ` H
À;$e{ÄIö§4ÄIö§4ÄpWù§4Ä
0 p R ‘V À;$e{ÄÀ;$e{ÄÀ;$e{ÄÀ;$e{Ä
R O O T . x m l € € f <?xml version='1.0'
encoding='utf-8'?>
<Context docBase="C:/www/Intranet/ROOT" path="">
</Context>
ÿÿÿÿ‚yG
B
B FILE0 a~Äà 8 0 “V B ` H
pü1e{Äpü1e{Äpü1e{Ä ¼å™ç.Ä
0 p X CV
pü1e{Äpü1e{Äpü1e{Äpü1e{Ä W W W I N T ~ 1 .
0 1 0 x ` CV
pü1e{Äpü1e{Äpü1e{Äpü1e{Ä w w w . i n t r a
n e t . 0 1 ¨ ˆ $ I 3 0 0 x x
”V X D “V pü1e{ÄÐB]{{ÄÐB]{{Ä`Ÿß™ç.Ä B
_ ÿÿÿÿ‚yG
B FILE0 ?~Äà @÷8 ”V < ` H
pü1e{ÄÐB]{{ÄÐB]{{Ä ¼å™ç.Ä
0 ` D “V pü1e{Äpü1e{Äpü1e{Äpü1e{Ä
_ ø $ I 3 0 0 è è
›W X H ”V ÐB]{{ÄÐB]{{ÄÐB]{{Ä`Ÿß™ç.Ä
o r g •V p Z ”V €±se{Äà„3}Ä ¼å™ç.Ä ‹¨4Ä0 ,
t l d C a c h e . s e r < ÿÿÿÿ‚yG
< FILE0 Ô& 8 ` •V < ` H
€±se{Äà„3}Ä ¼å™ç.Ä ‹¨4Ä
0 x Z ”V €±se{Ä€±se{Ä€±se{Ä€±se{Ä
t l d C a c h e . s e r € H , ¬í ur
[Ljava.lang.String;ÒVçé{G xp ‚yGÿÿÿÿ‚yG
<
< FILE0 ^ && 8 8 –V < Ä ` H
pÈ“e{Ä@HÇòN3Ä@(protected)
0 x Z b pÈ“e{ÄpÈ“e{ÄpÈ“e{ÄpÈ“e{Ä
G E P L A T ~ 1 . C O M b a s 0 ˆ l b
pÈ“e{ÄpÈ“e{ÄpÈ“e{ÄpÈ“e{Ä g e . p l a t f o
r m - b a s i c . c o m ˜ x $ I 3 0 0
h h —V h R –V pÈ“e{Äp Œ¨4< p Œ¨4Äp Œ¨4Äp
j R O O T . x m l —â p ^ –V
@HÇòN3ÄоE¨4ÄоE¨4ÄоE¨4Ä u s e r i m a g e
s . x m l —â p Z –V @HÇòN3ÄоE¨4ÄоE¨4ÄоE¨4Ä
U S E R I M ~ 1 . X M L ÿÿÿÿ‚yG
< FILE0 < && 8 ˜ —V < ` H
pÈ“e{Äp Œ¨4Äp Œ¨4Ä Ÿ¨4Ä
0 p R –V pÈ“e{ÄpÈ“e{ÄpÈ“e{ÄpÈ“e{Ä
R O O T . x m l € ˆ j <?xml version='1.0'
encoding='utf-8'?>
<Context docBase="C:/www/HotelGallery/ROOT" path="">
</Context>
ÿÿÿÿ‚yG
<
‚ðXT€ OK
P,‚e: Fri, 07 May 2004 09:41:20 GMT
Server: Apache/2.0.49 (Win32) mod_ssl/2.0.46 OpenSSL/0.9.7b mod_jk2/2.0.2
Content-Type: text/html; charset=ISO-8859-1
Connection: close
======== END HTTP HEADER CHUNK ===============
Now the reason I believe that this is a mod_jk2 (or related) problem is
that, when I access the same JSP page(s) directly via Tomcat (http1.1
connector), this does not EVER happen (except once on Tomcat 4.1.30)! We do
need to run through Apache2 however for various reasons such as static
content serving, SSL certificate management (although this particular site
runs over HTTP).
In the Apache2 error.log file I see a number of these outputs:
========= APACHE ERROR LOG SNIPPET ===========
[Fri May 07 12:25:32 2004] [error] Error ajp_process_callback - write failed
[Fri May 07 12:25:32 2004] [error] ajp13.service() ajpGetReply recoverable
error 3
[Fri May 07 12:25:33 2004] [error] ajp13.service() Error forwarding
ajp13:localhost:8009 1 0
[Fri May 07 12:25:33 2004] [error] mod_jk.handler() Error connecting to
tomcat 3
======== END APACHE ERROR LOG SNIPPET =========
There does not seem to be any error reports being generated by Tomcat (in
any of the logs) other than these:
======= TOMCAT ERROR LOG SNIPPET =============
SEVERE: Error, processing connection
java.net.SocketException: Software caused connection abort: recv failed
at
java.net.SocketInputStream.socketRead0(Native Method)
at
java.net.SocketInputStream.read (
SocketInputStream.java:129)
at
java.io.BufferedInputStream.fill (
BufferedInputStream.java:183)
at
java.io.BufferedInputStream.read1 (
BufferedInputStream.java:222)
at
java.io.BufferedInputStream.read (
BufferedInputStream.java:277)
at
org.apache.jk.common.ChannelSocket.read (
ChannelSocket.java:580)
at
org.apache.jk.common.ChannelSocket.receive (
ChannelSocket.java:518)
at
org.apache.jk.common.ChannelSocket.processConnection (
ChannelSocket.java:638)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:829)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:688)
at
java.lang.Thread.run (
Thread.java:534)
2004/05/07 11:47:25
org.apache.jk.common.HandlerRequest invoke
INFO: Unknown message 0
2004/05/07 12:25:32
org.apache.jk.common.HandlerRequest invoke
INFO: Unknown message 0
2004/05/07 12:25:33
org.apache.jk.common.HandlerRequest invoke
INFO: Unknown message 0
===== END TOMCAT ERROR LOG SNIPPET ===========
It should also be noted that I have encountered the same (or VERY similar
issues) with mod_jk 1.2 using Apache 2.0.46 and Tomcat 3.2.x, 3.3.x and
4.x.x.
This problem could also be related the the CoyoteeConnector implementation
within Tomcat? I must admit to being at a rather large loss, and this
problem is starting to impact negatively on my business - hence the length
and almost desparate email!
I look forward to any assistance possible!
Best regards,
Carl Olivier
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)