[GRIZZLY-1254] This error occurs occasionally for no apparent reason, causing glassfish does not deliver all packets. Created: 15/Apr/12  Updated: 25/Apr/12  Resolved: 25/Apr/12

Status: Resolved
Project: grizzly
Component/s: ajp
Affects Version/s: 1.9.47
Fix Version/s: 1.9.49

Type: Bug Priority: Major
Reporter: lflince Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Glassfish 3.1.2 build 23 Apache/2.2.9 mod_jk/1.2.32 Windows 2003 Server x64


Attachments: XML File domain.xml     Text File glassfish-jk.properties.txt     Java Archive File grizzly-http-ajp.jar     Text File httpd.conf     File log.7z     Zip Archive log2.zip     Text File server.log    

 Description   

[#|2012-04-14T20:36:21.593-0500|SEVERE|glassfish3.1.2|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=1333;_ThreadName=Thread-2;|GRIZZLY0051: ProcessorTask exception.
java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkBounds(Buffer.java:559)
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:143)
at com.sun.grizzly.util.InputReader.read(InputReader.java:216)
at com.sun.grizzly.http.ajp.AjpInputBuffer.ensureAvailable(AjpInputBuffer.java:210)
at com.sun.grizzly.http.ajp.AjpInputBuffer.readAjpMessageHeader(AjpInputBuffer.java:79)
at com.sun.grizzly.http.ajp.AjpProcessorTask.parseRequest(AjpProcessorTask.java:107)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:706)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)

#]

The log file is full of this error, several of these messages per second. The only way to stop it is going to: "server config \ network config \ protocols \ jk-connector \ HTTP modify" Max Connections value and SAVE. However, no matter how high the value set, this error will occur at some moment.



 Comments   
Comment by oleksiys [ 15/Apr/12 ]

can you pls. try the patch from the issue
http://java.net/jira/browse/GLASSFISH-18446

Comment by lflince [ 15/Apr/12 ]

When I had the 1.9.46 version, I tried that patch, but the error continued to appear. Now I have version 1.9.47, which I understand includes this patch.

http://java.net/jira/secure/ReleaseNote.jspa?projectId=10005&version=15532

Comment by oleksiys [ 15/Apr/12 ]

can you pls. give more details on GF and apache config?
May be steps to reproduce the issue?

Comment by lflince [ 15/Apr/12 ]

Attach more info, thanks.

Comment by oleksiys [ 15/Apr/12 ]

can you pls. also attach apache config (httpd.conf)?
And if possible simple app we can use to reproduce the issue.

Comment by lflince [ 15/Apr/12 ]

Attached httpd.conf
But a app not is simple

Comment by lflince [ 16/Apr/12 ]

I do not know if this can help, from side Apache, the log file mod_jk.log, appears that, when errors occur:

[Sun Apr 15 19:55:06.843 2012] [3348:2152] [info] ajp_connection_tcp_get_message::jk_ajp_common.c (1266): (wk_glassfish1) can't receive the response header message from tomcat, tomcat (127.0.0.1:8009) has forced a connection close for socket 4616
[Sun Apr 15 19:55:06.843 2012] [3348:2152] [error] ajp_get_reply::jk_ajp_common.c (2118): (wk_glassfish1) Tomcat is down or refused connection. No response has been sent to the client (yet)

Comment by lflince [ 16/Apr/12 ]

Sometimes glassfish can send this message:

Bad Gateway
The proxy server received an invalid response from an upstream server.

Comment by oleksiys [ 16/Apr/12 ]

Can you pls. patch GF 3.1.2 (Grizzly version 1.9.47) w/ the attached jar (copy the attached jar into gfv3/glassfish/modules folder)?
It adds logging, so it would be easier to find the problem.

Thanks.

Comment by lflince [ 16/Apr/12 ]

Thanks, I'll try

Comment by lflince [ 16/Apr/12 ]

Attach new log file with error + other log info

Thanks

Comment by oleksiys [ 16/Apr/12 ]

can you pls. attach all the log files in the folder (pls. compress them before)
thx.

Comment by oleksiys [ 16/Apr/12 ]

the patch with more logs

Comment by lflince [ 16/Apr/12 ]

Attach all log file after apply first patch

Comment by lflince [ 16/Apr/12 ]

The new patch will have to apply when reduced traffic on the server

Comment by lflince [ 17/Apr/12 ]

Attach new log files with error info

Thanks

Comment by oleksiys [ 17/Apr/12 ]

this patch has to fix the issue.
can you pls. check it?

thx.

Comment by lflince [ 17/Apr/12 ]

I'll try

Thanks

Comment by lflince [ 19/Apr/12 ]

Yes, the issue is fixed, thanks oleksiys

Comment by oleksiys [ 25/Apr/12 ]

fixed

Revision: c9e76d95f250590e2b670709079887027f3bddfa
Date: 2012-04-25 08:50:52 UTC

Log Message:
------------
+ fix issue #1254
http://java.net/jira/browse/GRIZZLY-1254
"This error occurs occasionally for no apparent reason, causing glassfish does not deliver all packets."

Generated at Thu Jul 30 10:19:20 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.