Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

Tomcat: Exception thrown whilst processing POSTed parameters

Thread view: 
govus - 25 Jul 2007 21:29 GMT
Hi folks,
I'm having a heck of a time trying to figure this out.  I'm getting
the following exception frequently in my Tomcat logs.  The exception
always seems to be thrown when I'm processing an AJAX request.

Could I be forgetting to do something on the client side?  Is this a
problem with Tomcat?  Could it be a problem with my code (unlikely as
that is... :-\ )?  Any hints would be appreciated! Thanks!

Jeff

Windows Server 2003
Apache Tomcat 5.5.23
JRE 1.5, Update 12

=========================
WARNING: Exception thrown whilst processing POSTed parameters
java.io.IOException: Exception filling buffer with data from
underlying input stream: not an EAGAIN status, so perhaps disconnected
client?
    at
org.apache.coyote.http11.InternalAprInputBuffer.fill(InternalAprInputBuffer.java:
825)
    at org.apache.coyote.http11.InternalAprInputBuffer
$SocketInputBuffer.doRead(InternalAprInputBuffer.java:853)
    at
org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:
116)
    at
org.apache.coyote.http11.InternalAprInputBuffer.doRead(InternalAprInputBuffer.java:
772)
    at org.apache.coyote.Request.doRead(Request.java:419)
    at
org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:
265)
    at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:403)
    at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:
280)
    at
org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:
193)
    at org.apache.catalina.connector.Request.readPostBody(Request.java:
2400)
    at org.apache.catalina.connector.Request.parseParameters(Request.java:
2379)
    at org.apache.catalina.connector.Request.getParameter(Request.java:
1005)
    at
org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:
353)
...
=========================
Manish Pandit - 26 Jul 2007 17:42 GMT
> Hi folks,
> I'm having a heck of a time trying to figure this out.  I'm getting
[quoted text clipped - 48 lines]
> ...
> =========================

It is a disconnect - something fails between the browser->apache-
>tomcat. The class throwing exception is basically an inputstream
wrapper in tomcat to parse HTTP requests. Are you using something like
Scriptaculous or any standard Ajax framework for the communication, or
have you written something of your own? If latter, you might want to
try using Scriptaculous/Prototype and see if the error goes away.

-cheers,
Manish
govus - 27 Jul 2007 15:57 GMT
Hi Manish,
Thanks for your response.  After much additional searching, I've
discovered that this is a bug with Tomcat 5.5.23. (http://
issues.apache.org/bugzilla/show_bug.cgi?id=40960).  I upgraded to
Tomcat 6.0.13 and that solved the problem.  Hope that helps someone.

Jeff
alexkrish@gmail.com - 31 Jul 2007 08:57 GMT
Hi Jeff,

Thanks for the response. I have a webapp which throws a similar
exception which is pasted below.  I am using Tomcat 5.5.23.

WARNING: Exception thrown whilst processing POSTed parameters
java.io.IOException: Socket read failed
    at org.apache.coyote.ajp.AjpAprProcessor.read(AjpAprProcessor.java:
1035)
    at
org.apache.coyote.ajp.AjpAprProcessor.readMessage(AjpAprProcessor.java:
1156)
    at org.apache.coyote.ajp.AjpAprProcessor.receive(AjpAprProcessor.java:
1088)
    at org.apache.coyote.ajp.AjpAprProcessor
$SocketInputBuffer.doRead(AjpAprProcessor.java:1226)
    at org.apache.coyote.Request.doRead(Request.java:419)
    at
org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:
265)
    at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:403)
    at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:
280)
    at
org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:
193)
    at org.apache.catalina.connector.Request.readPostBody(Request.java:
2400)
    at org.apache.catalina.connector.Request.parseParameters(Request.java:
2379)
    at org.apache.catalina.connector.Request.getParameter(Request.java:
1005)
    at
org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:
353)
    at
com.ea.zoho.server.action.forms.TemplateMgr.execute(TemplateMgr.java:
28)
    at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:
484)
    at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:
1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:
525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
269)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
188)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
210)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
174)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
127)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
117)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
108)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
151)
    at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:
444)
    at org.apache.coyote.ajp.AjpAprProtocol
$AjpConnectionHandler.process(AjpAprProtocol.java:472)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:
1286)
    at java.lang.Thread.run(Thread.java:619)

When exactly is this "socket read failed" thrown ?  I have even tried
changing the maxPostSize to a maximum value, but in vain.
This exception seems to be thrown for each of the post request.

Please help me with some pointers to overcome this issue.

Thanks,
Alex
govus - 08 Aug 2007 21:56 GMT
Hi Alex,
Sorry it took me so long to get back to you.  As best as I can figure
(and I'm no expert), the exception occurs when APR is parsing the
POSTed parameters.  Did you install the Tomcat native library (\bin
\tcnative-1.dll)?  I think not using the native library will solve the
problem.  Something in there (I think) is causing the parse of the
POSTed parameters to fail. I'm not sure if you have to reinstall
Tomcat to get rid of the DLL or if you can just remove the file.

I have two servers, one running with the native library and one
without it.  The one with the native library still has this exception
thrown (even after upgrading to Tomcat 6).  I have not observed this
issue with the server running without the native library.  That's my
best guess.

Jeff
P.S. - I just assumed you were using Windows.  I don't think the
Tomcat native library is supplied for any other OS.  If you're not
using Windows, then you can probably ignore everything I just said.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.