最近在Tomcat与apache2集群的问题的应用程序中,
有一个文件下载的功能。在连续多次点击下载,然后再打开的下载对话框点击【取消】之后。出现服务器无法访问503的错误。
错误日志:
- catalina.out:
- Exception thrown whilst processing POSTed parameters
- java.io.IOException
- at org.apache.jk.common.JkInputStream.receive(JkInputStream.java:205)
- at org.apache.jk.common.JkInputStream.doRead(JkInputStream.java:179)
- at org.apache.coyote.Request.doRead(Request.java:419)
- at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:264)
- at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:403)
- at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:279)
- at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193)
catalina.out:
Exception thrown whilst processing POSTed parameters
java.io.IOException
at org.apache.jk.common.JkInputStream.receive(JkInputStream.java:205)
at org.apache.jk.common.JkInputStream.doRead(JkInputStream.java:179)
at org.apache.coyote.Request.doRead(Request.java:419)
at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:264)
at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:403)
at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:279)
at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193)
最后在tomcat的邮件列表里面找到的原因:
- "ArthIT" wrote in message
- news:26531167.post@talk.nabble.com...
- >
- > Hi,
- >
- > we are facing some weird problems at one of our customers.
- > Our application is running on a tomcat server behind a Apache2 Webserver
- > which does SSL.
- > The servers are connected with mod_proxy_ajp.
- > The network is a slow 2MBit WAN which is used to capacity.
- >
- > Within this infrastructure we periodically get Broken Pipe Exceptions
- > which
- > are caused by an IOException in JKInputStream.
- >
- > Conspicuous is the following: When an IOException occurs in most of the
- > cases (not in all) it is followed by another one, exactly 30seconds later.
- > I think Apache tries to resend the request to tomcat after a timout is
- > reached.
- >
- > The IOExceptions in JKInputStream are thrown on AjaxRequests only
- > (realised
- > with wicktes AjaxFormSubmittingBehavior), which are done on every "onblur"
- > javascript event. Our app contains pretty complex forms, with many input
- > fields (>200). If one is tabbing fast through the form many ajax events
- > are
- > fired...
- >
- > I tried to reproduce this at our companies network with FireFox Network
- > throttling plugin (500Byte/s up and download), without luck.
- >
- > Note:
- > The customer uses IE6 and IE7.
- > This problem arises at the special WAN Network only. Our customer has
- > another internal production system (same application) at a LAN network,
- > which does not face these Exceptions.
- >
- >
- > Does anybody has a hint or idea what could be going on? That would be
- > great!
- > Many thanks in advance to everybody who investigates on this.
- >
- The first Exception below is harmless, since it is just Tomcat trying to
- tell Apache that it is ready for the next request, but Apache has stopped
- listening. It just results in the Thread going back to the pool. The
- second Exception below is from Tomcat requesting the POST body from Apache,
- but not getting it.
- My best guess is that Apache is timing out when trying to read the request
- body from the WAN. It then tells mod_proxy_ajp that it couldn't get the
- data it wants. Then mod_proxy_ajp thinks that the client has gone away, so
- signals this to Tomcat by closing the connection. This results in the
- second Exception below when Tomcat is trying to read from a closed
- connection.
- The Apache logs would be the place to look for more information.
- > See bellow the stack traces:
- >
- > catalina.out:
- > 20.11.2009 10:22:29 org.apache.jk.core.MsgContext action
- > WARNUNG: Error sending end packet
- > java.net.SocketException: Broken pipe
- > at java.net.SocketOutputStream.socketWrite0(Native Method)
- > at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
- > at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
- > at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:537)
- > at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:127)
- > at org.apache.jk.core.MsgContext.action(MsgContext.java:305)
- > at org.apache.coyote.Response.action(Response.java:183)
- > at org.apache.coyote.Response.finish(Response.java:305)
- > at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:205)
- > at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
- > at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
- > at
- > org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
- > at
- > org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
- > at
- > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
- > at java.lang.Thread.run(Thread.java:595)
- >
- > application.log:
- > 2009-11-20 10:22:29,042 WARN [TP-Processor2]
- > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/customer]
- > -
- > Exception thrown whilst processing POSTed parameters
- > java.io.IOException
- > at org.apache.jk.common.JkInputStream.receive(JkInputStream.java:205)
- > at org.apache.jk.common.JkInputStream.doRead(JkInputStream.java:179)
- > at org.apache.coyote.Request.doRead(Request.java:419)
- > at
- > org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:264)
- > at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:403)
- > at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:279)
- > at
- > org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193)
- > at org.apache.catalina.connector.Request.readPostBody(Request.java:2420)
- > at
- > org.apache.catalina.connector.Request.parseParameters(Request.java:2399)
- > at org.apache.catalina.connector.Request.getParameter(Request.java:1005)
- > at
- > org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:353)
- > at
- > COM.customer.foo.servlets.WrappedRequest.getParameter(WrappedRequest.java:134)
- > at
- > org.apache.wicket.protocol.http.servlet.ServletWebRequest.getParameter(ServletWebRequest.java:105)
- > at
- > org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:198)
- > at org.apache.wicket.Request.getRequestParameters(Request.java:171)
- > at org.apache.wicket.RequestCycle.step(RequestCycle.java:1233)
- > at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
- > at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
- > at
- > org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
- > at
- > org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:145)
- > 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
- > COM.customer.foo.servlets.AdaptiveEncodingFilter.doFilter(AdaptiveEncodingFilter.java:54)
- > at
- > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
- > at
- > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
- > at
- > COM.customer.foo.servlets.PerformanceMonitorFilter.doFilter(PerformanceMonitorFilter.java:60)
- > at
- > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
- > at
- > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
- > at
- > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
- > at
- > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
- > at
- > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
- > at
- > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
- > at
- > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
- > at
- > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:548)
- > at
- > org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:420)
- > at
- > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
- > at
- > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
- > at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
- > at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
- > at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
- > at
- > org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
- > at
- > org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
- > at
- > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
- > at java.lang.Thread.run(Thread.java:595)
- >
- >
- >
- >
- >
- > --
- > View this message in context:
- > and-Apache-2-tp26531167p26531167.html
- > Sent from the Tomcat - User mailing list archive at Nabble.com.
- ---------------------------------------------------------------------
- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
- For additional commands, e-mail: users-help@tomcat.apache.org
阅读(1403) | 评论(0) | 转发(0) |