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&ÂÃÃ |"[EMAIL PROTECTED]:ÂÃÃÃE{&ÂÃÃ
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]
[EMAIL PROTECTED],-21787
ÃÃÃÃâyG
!
!FILE0 Ãzà Ã*â8 à % à ` H
âÃ&ÂÃÃÂÃÃGÂÃà [EMAIL PROTECTED]'à j
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]
[EMAIL PROTECTED],-21782
[LocalizedFileNames]
Windows Media [EMAIL PROTECTED]:\WINDOWS\inf\unregmp2.exe,-4
Remote [EMAIL PROTECTED],-152
Outlook Express.Ã [EMAIL PROTECTED],-22053
ÃÃÃÃâyG
à FILE0 6sà 8 à % à ` H
âÃ&ÂÃÃÂ&[EMAIL PROTECTED]'à j
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
ÃÃ [EMAIL PROTECTED]
0Â]jÃpÃojÃpÃojÃÂAÅÂÃ2Ã Ã %& Â %& Â
%& Ë Â ( 8 ` 8 0 Ã ÃÃ
[EMAIL 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 [EMAIL PROTECTED] Ë
Ââ!
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 @ Ã xÂ
ÃÂUTÃY`aÃÃY`aÃÂÃÂ}4Ã
[EMAIL PROTECTED] ÂÃ2Ã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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
[EMAIL PROTECTED]@HÃÃN3Ã`yÃÂ4Ã
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]