You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jim Hopp <ji...@netyourwork.com> on 2004/02/26 18:05:49 UTC

occasional ArrayIndexOutOfBoundsException in MsgAjp on linux

Greetings-

We're running Apache 2.0.48, JK 1.2.5, and Tomcat 4.1.29, java
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
on Linux 2.4.20 with glibc 2.3.2 in a production environment.  We're
not using the LD_ASSUME_KERNEL export since we're not running glibc 2.2.

Two or three times a day, I'll see this exception in the Tomcat log:

Feb 13, 2004 12:43:00 PM org.apache.jk.common.HandlerRequest invoke
SEVERE: Error decoding request
java.lang.ArrayIndexOutOfBoundsException: 11968
     at org.apache.jk.common.MsgAjp.getInt(MsgAjp.java:233)
     at org.apache.jk.common.MsgAjp.getBytes(MsgAjp.java:257)
     at
org.apache.jk.common.HandlerRequest.decodeHeaders(HandlerRequest.java:676)
     at
org.apache.jk.common.HandlerRequest.decodeRequest(HandlerRequest.java:512)
     at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:365)
     at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
     at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615)
     at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
     at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
     at java.lang.Thread.run(Thread.java:534)
12 34 05 17 02 02 00 08 48 54 54 50 2f 31 2e 31  | .4......HTTP/1.1
00 00 15 2f 69 6d 61 67 65 73 2f 72 65 6c 5f 74  | .../images/rel_t
61 73 6b 73 2e 67 69 66 00 00 0b 36 37 2e 31 36  | asks.gif...67.16
<snip>

In the jk log I'll see

[Fri Feb 13 12:43:00 2004]  [jk_ajp_common.c (738)]: ERROR: can't
receive the response message from tomcat, network problems or tomcat is
down. err=-104
[Fri Feb 13 12:43:00 2004]  [jk_ajp_common.c (738)]: ERROR: can't
receive the response message from tomcat, network problems or tomcat is
down. err=-1
[Fri Feb 13 12:43:00 2004]  [jk_ajp_common.c (1290)]: ERROR: Receiving
from tomcat failed, recoverable operation. err=0
[Fri Feb 13 12:43:00 2004]  [jk_ajp_common.c (1290)]: ERROR: Receiving
from tomcat failed, recoverable operation. err=0

The Apache child process then becomes unresponsive, and Apache starts
another child process to service requests.  The first child process
immediately sucks up all of a CPU (we're running on a four-CPU box), and
doesn't die until we restart Apache.  Tomcat keeps going.

The user simply hits refreshs their page, and this time the request goes
through.

Other than this, everything works great.

I cannot find any mention of this error in Bugzilla or thru Google.

Here's my workers.properties, and jk conf files:

workers.properties:
worker.list=ui, mrkt

worker.ui.type=ajp13
worker.ui.host=127.0.0.1
worker.ui.port=8019
worker.ui.cachesize=10
worker.ui.cache_timeout=600
worker.ui.connect_timeout=500
worker.ui.prepost_timeout=500

worker.mrkt.type=ajp13
worker.mrkt.host=127.0.0.1
worker.mrkt.port=8029
worker.mrkt.cachesize=10
worker.mrkt.cache_timeout=600
worker.mrkt.connect_timeout=500
worker.mrkt.prepost_timeout=500

jk1.conf: (gets included in a vhost section):
JkOptions -ForwardKeySize -ForwardDirectories -ForwardURICompat 
+ForwardURICompatUnparsed

# note that the last JkLogFile set applies to all vhosts, not just this one.
JkLogFile /var/log/httpd/jk-ui.log
JkLogLevel info

JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkRequestLogFormat set the request format
#JkRequestLogFormat "%w %V %T"
JkRequestLogFormat "%V %U %w %s %b %T"

JkMount /* ui

jk2.conf (included in another vhost):
JkOptions -ForwardKeySize -ForwardDirectories -ForwardURICompat 
+ForwardURICompatUnparsed
# note that the last JkLogFile set applies to all vhosts, not just this one.
JkLogFile /var/log/httpd/jk.log
JkLogLevel info

JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkRequestLogFormat set the request format
#JkRequestLogFormat "%w %V %T"
JkRequestLogFormat "%V %U %w %s %b %T"

JkMount /demoRegistration/mail.servlet mrkt
JkMount /demoRegistration/ping.servlet mrkt
JkMount /freeQBTrial/mail.servlet mrkt
JkMount /freeQBTrial/ping.servlet mrkt
JkMount /talkToUs/mail.servlet mrkt
JkMount /talkToUs/ping.servlet mrkt
JkMount /buyIt/mail.servlet mrkt
JkMount /buyIt/ping.servlet mrkt
JkMount /qbupload/qbupload.servlet mrkt
JkMount /qbupload/ping.servlet mrkt

I'd be grateful for any ideas/comments/things to try.

-Jim Hopp

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


Re: occasional ArrayIndexOutOfBoundsException in MsgAjp on linux

Posted by Jim Hopp <ji...@netyourwork.com>.
Sure - Here's a complete request dump.

Feb 14, 2004 9:22:11 AM org.apache.jk.common.HandlerRequest invoke
SEVERE: Error decoding request
java.lang.ArrayIndexOutOfBoundsException: 29062
	at org.apache.jk.common.MsgAjp.getInt(MsgAjp.java:233)
	at org.apache.jk.common.MsgAjp.getBytes(MsgAjp.java:257)
	at 
org.apache.jk.common.HandlerRequest.decodeRequest(HandlerRequest.java:502)
	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:365)
	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
	at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615)
	at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
	at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
	at java.lang.Thread.run(Thread.java:534)
12 34 02 dd 02 02 00 08 48 54 54 50 2f 31 2e 31  | .4.?....HTTP/1.1
00 02 02 00 11 00 08 48 54 54 50 2f 31 2e 31 00  | .......HTTP/1.1.
69 6d 67 2e 75 69 00 00 00 00 00 00 00 00 00 00  | img.ui..........
00 00 00 0b 00 23 2f 70 75 62 6c 69 63 2f 69 6d  | .....#/public/im
61 67 ff ff 2f 70 72 6f 76 69 64 65 64 5f 62 79  | ag??/provided_by
5f 6c 6f 67 6f 2e 67 69 66 00 00 00 00 00 00 00  | _logo.gif.......
00 00 00 00 00 00 00 00 00 12 75 31 2e 6e 65 74  | ..........u1.net
79 6f 75 72 77 6f 72 6b 2e 63 6f 6d 00 01 bb 00  | yourwork.com..?.
00 01 37 2e 31 36 39 2e 32 2e 33 35 00 00 ff ff  | ..7.169.2.35..??
00 00 00 12 75 31 2e 6e 65 74 79 6f 75 72 77 6f  | ....u1.netyourwo
72 6b 2e 63 6f 6d 00 01 bb 01 00 03 2a 2f 2a 00  | rk.com..?...*/*.
a0 01 00 03 2a 2f 2a 00 a0 0d a0 0d 00 25 00 25  | ?...*/*.?.?..%.%
68 74 74 70 73 3a 2f 2f 75 31 2e 6e 65 74 79 6f  | https://u1.netyo
75 72 77 6f 72 6b 2e 63 6f 6d 2f 73 74 61 72 74  | urwork.com/start
2f 70 6c 65 63 00 00 00 00 00 00 00 00 00 00 00  | /plec...........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
00 00 00 00 00 00 00 00 00 00 00 00 a0 04 a0 04  | ............?.?.
00 05 65 6e 2d 75 73 00 73 00 00 00 00 00 00 00  | ..en-us.s.......
a0 03 00 00 00 0d 00 0d 67 7a 69 70 2c 20 64 65  | ?.......gzip, de
66 6c 61 74 65 00 00 00 00 00 00 00 00 00 00 00  | flate...........
00 00 00 00 a0 0e a0 0e 00 58 00 58 4d 6f 7a 69  | ....?.?..X.XMozi
6c 6c 61 2f 34 2e 30 20 28 63 6f 6d 70 61 74 69  | lla/4.0 (compati
62 6c 65 3b 20 4d 53 49 45 20 36 2e 30 3b 20 57  | ble; MSIE 6.0; W
69 6e 64 6f 77 73 20 4e 54 20 35 2e 31 3b 20 2e  | indows NT 5.1; .
4e 45 54 20 43 4c 52 20 31 2e 30 2e 33 37 30 35  | NET CLR 1.0.3705
3b 20 2e 4e 45 54 20 43 4c 52 20 31 2e 31 2e 34  | ; .NET CLR 1.1.4
33 32 32 29 00 00 00 00 00 00 00 00 00 00 00 00  | 322)............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 a0 0b  | ..............?.
00 00 00 12 00 12 75 31 2e 6e 65 74 79 6f 75 72  | ......u1.netyour
77 6f 72 6b 2e 63 6f 6d 00 00 00 00 00 00 00 00  | work.com........
00 00 00 00 00 00 00 00 00 00 00 00 a0 06 a0 06  | ............?.?.
00 0a 00 0a 4b 65 65 70 2d 41 6c 69 76 65 00 00  | ....Keep-Alive..
00 00 00 00 00 00 00 00 00 00 a0 09 a0 09 00 2e  | ..........?.?...
00 2e 4a 53 45 53 53 49 4f 4e 49 44 3d 34 34 45  | ..JSESSIONID=44E
46 46 35 45 31 39 43 37 45 44 46 31 44 37 43 37  | FF5E19C7EDF1D7C7
34 38 36 41 43 38 42 41 42 31 45 33 31 2e 75 69  | 486AC8BAB1E31.ui
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
a0 08 00 01 30 00 05 ff 00 25 61 74 74 72 69 62  | ?...0..?.%attrib
75 74 65 3d 53 69 67 6e 6f 6e 5f 4c 6f 67 6f 26  | ute=Signon_Logo&
63 75 73 74 6f 6d 65 72 49 64 3d 70 6c 65 63 00  | customerId=plec.
ff                                               | ?
                                                  |
                                                  |
                                                  |
                                                  |
                                                  |
                                                  |
                                                  |
                                                  |
                                                  |
                                                  |
                                                  |
                                                  |
                                                  |
                                                  |
                                                  |
                                                  |

Bill Barker wrote:
> Could I see the rest of the request dump (the part after the '<snip>')?
> 
> "Jim Hopp" <ji...@netyourwork.com> wrote in message
> news:403E276D.1000702@netyourwork.com...
> 
>>Greetings-
>>
>>We're running Apache 2.0.48, JK 1.2.5, and Tomcat 4.1.29, java
>>java version "1.4.2"
>>Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
>>Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
>>on Linux 2.4.20 with glibc 2.3.2 in a production environment.  We're
>>not using the LD_ASSUME_KERNEL export since we're not running glibc 2.2.
>>
>>Two or three times a day, I'll see this exception in the Tomcat log:
>>
>>Feb 13, 2004 12:43:00 PM org.apache.jk.common.HandlerRequest invoke
>>SEVERE: Error decoding request
>>java.lang.ArrayIndexOutOfBoundsException: 11968
>>     at org.apache.jk.common.MsgAjp.getInt(MsgAjp.java:233)
>>     at org.apache.jk.common.MsgAjp.getBytes(MsgAjp.java:257)
>>     at
>>org.apache.jk.common.HandlerRequest.decodeHeaders(HandlerRequest.java:676)
>>     at
>>org.apache.jk.common.HandlerRequest.decodeRequest(HandlerRequest.java:512)
>>     at
> 
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:365)
> 
>>     at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
>>     at
>>
> 
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615)
> 
>>     at
> 
> org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
> 
>>     at
>>
> 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:666)
> 
>>     at java.lang.Thread.run(Thread.java:534)
>>12 34 05 17 02 02 00 08 48 54 54 50 2f 31 2e 31  | .4......HTTP/1.1
>>00 00 15 2f 69 6d 61 67 65 73 2f 72 65 6c 5f 74  | .../images/rel_t
>>61 73 6b 73 2e 67 69 66 00 00 0b 36 37 2e 31 36  | asks.gif...67.16
>><snip>

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


Re: occasional ArrayIndexOutOfBoundsException in MsgAjp on linux

Posted by Bill Barker <wb...@wilshire.com>.
Could I see the rest of the request dump (the part after the '<snip>')?

"Jim Hopp" <ji...@netyourwork.com> wrote in message
news:403E276D.1000702@netyourwork.com...
> Greetings-
>
> We're running Apache 2.0.48, JK 1.2.5, and Tomcat 4.1.29, java
> java version "1.4.2"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
> Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
> on Linux 2.4.20 with glibc 2.3.2 in a production environment.  We're
> not using the LD_ASSUME_KERNEL export since we're not running glibc 2.2.
>
> Two or three times a day, I'll see this exception in the Tomcat log:
>
> Feb 13, 2004 12:43:00 PM org.apache.jk.common.HandlerRequest invoke
> SEVERE: Error decoding request
> java.lang.ArrayIndexOutOfBoundsException: 11968
>      at org.apache.jk.common.MsgAjp.getInt(MsgAjp.java:233)
>      at org.apache.jk.common.MsgAjp.getBytes(MsgAjp.java:257)
>      at
> org.apache.jk.common.HandlerRequest.decodeHeaders(HandlerRequest.java:676)
>      at
> org.apache.jk.common.HandlerRequest.decodeRequest(HandlerRequest.java:512)
>      at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:365)
>      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
>      at
>
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615)
>      at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
>      at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:666)
>      at java.lang.Thread.run(Thread.java:534)
> 12 34 05 17 02 02 00 08 48 54 54 50 2f 31 2e 31  | .4......HTTP/1.1
> 00 00 15 2f 69 6d 61 67 65 73 2f 72 65 6c 5f 74  | .../images/rel_t
> 61 73 6b 73 2e 67 69 66 00 00 0b 36 37 2e 31 36  | asks.gif...67.16
> <snip>
>
> In the jk log I'll see
>
> [Fri Feb 13 12:43:00 2004]  [jk_ajp_common.c (738)]: ERROR: can't
> receive the response message from tomcat, network problems or tomcat is
> down. err=-104
> [Fri Feb 13 12:43:00 2004]  [jk_ajp_common.c (738)]: ERROR: can't
> receive the response message from tomcat, network problems or tomcat is
> down. err=-1
> [Fri Feb 13 12:43:00 2004]  [jk_ajp_common.c (1290)]: ERROR: Receiving
> from tomcat failed, recoverable operation. err=0
> [Fri Feb 13 12:43:00 2004]  [jk_ajp_common.c (1290)]: ERROR: Receiving
> from tomcat failed, recoverable operation. err=0
>
> The Apache child process then becomes unresponsive, and Apache starts
> another child process to service requests.  The first child process
> immediately sucks up all of a CPU (we're running on a four-CPU box), and
> doesn't die until we restart Apache.  Tomcat keeps going.
>
> The user simply hits refreshs their page, and this time the request goes
> through.
>
> Other than this, everything works great.
>
> I cannot find any mention of this error in Bugzilla or thru Google.
>
> Here's my workers.properties, and jk conf files:
>
> workers.properties:
> worker.list=ui, mrkt
>
> worker.ui.type=ajp13
> worker.ui.host=127.0.0.1
> worker.ui.port=8019
> worker.ui.cachesize=10
> worker.ui.cache_timeout=600
> worker.ui.connect_timeout=500
> worker.ui.prepost_timeout=500
>
> worker.mrkt.type=ajp13
> worker.mrkt.host=127.0.0.1
> worker.mrkt.port=8029
> worker.mrkt.cachesize=10
> worker.mrkt.cache_timeout=600
> worker.mrkt.connect_timeout=500
> worker.mrkt.prepost_timeout=500
>
> jk1.conf: (gets included in a vhost section):
> JkOptions -ForwardKeySize -ForwardDirectories -ForwardURICompat
> +ForwardURICompatUnparsed
>
> # note that the last JkLogFile set applies to all vhosts, not just this
one.
> JkLogFile /var/log/httpd/jk-ui.log
> JkLogLevel info
>
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> # JkRequestLogFormat set the request format
> #JkRequestLogFormat "%w %V %T"
> JkRequestLogFormat "%V %U %w %s %b %T"
>
> JkMount /* ui
>
> jk2.conf (included in another vhost):
> JkOptions -ForwardKeySize -ForwardDirectories -ForwardURICompat
> +ForwardURICompatUnparsed
> # note that the last JkLogFile set applies to all vhosts, not just this
one.
> JkLogFile /var/log/httpd/jk.log
> JkLogLevel info
>
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> # JkRequestLogFormat set the request format
> #JkRequestLogFormat "%w %V %T"
> JkRequestLogFormat "%V %U %w %s %b %T"
>
> JkMount /demoRegistration/mail.servlet mrkt
> JkMount /demoRegistration/ping.servlet mrkt
> JkMount /freeQBTrial/mail.servlet mrkt
> JkMount /freeQBTrial/ping.servlet mrkt
> JkMount /talkToUs/mail.servlet mrkt
> JkMount /talkToUs/ping.servlet mrkt
> JkMount /buyIt/mail.servlet mrkt
> JkMount /buyIt/ping.servlet mrkt
> JkMount /qbupload/qbupload.servlet mrkt
> JkMount /qbupload/ping.servlet mrkt
>
> I'd be grateful for any ideas/comments/things to try.
>
> -Jim Hopp




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