Chinaunix首页 | 论坛 | 博客
  • 博客访问: 873454
  • 博文数量: 372
  • 博客积分: 10063
  • 博客等级: 中将
  • 技术积分: 4220
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-24 11:36
文章分类

全部博文(372)

文章存档

2012年(372)

分类: 虚拟化

2012-03-16 16:28:27

最近在Tomcat与apache2集群的问题的应用程序中,

有一个文件下载的功能。在连续多次点击下载,然后再打开的下载对话框点击【取消】之后。出现服务器无法访问503的错误。

错误日志:

Java代码 复制代码 收藏代码
  1. catalina.out:
  2. Exception thrown whilst processing POSTed parameters
  3. java.io.IOException
  4. at org.apache.jk.common.JkInputStream.receive(JkInputStream.java:205)
  5. at org.apache.jk.common.JkInputStream.doRead(JkInputStream.java:179)
  6. at org.apache.coyote.Request.doRead(Request.java:419)
  7. at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:264)
  8. at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:403)
  9. at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:279)
  10. 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的邮件列表里面找到的原因:

Python代码 复制代码 收藏代码
  1. "ArthIT" wrote in message
  2. news:26531167.post@talk.nabble.com...
  3. >
  4. > Hi,
  5. >
  6. > we are facing some weird problems at one of our customers.
  7. > Our application is running on a tomcat server behind a Apache2 Webserver
  8. > which does SSL.
  9. > The servers are connected with mod_proxy_ajp.
  10. > The network is a slow 2MBit WAN which is used to capacity.
  11. >
  12. > Within this infrastructure we periodically get Broken Pipe Exceptions
  13. > which
  14. > are caused by an IOException in JKInputStream.
  15. >
  16. > Conspicuous is the following: When an IOException occurs in most of the
  17. > cases (not in all) it is followed by another one, exactly 30seconds later.
  18. > I think Apache tries to resend the request to tomcat after a timout is
  19. > reached.
  20. >
  21. > The IOExceptions in JKInputStream are thrown on AjaxRequests only
  22. > (realised
  23. > with wicktes AjaxFormSubmittingBehavior), which are done on every "onblur"
  24. > javascript event. Our app contains pretty complex forms, with many input
  25. > fields (>200). If one is tabbing fast through the form many ajax events
  26. > are
  27. > fired...
  28. >
  29. > I tried to reproduce this at our companies network with FireFox Network
  30. > throttling plugin (500Byte/s up and download), without luck.
  31. >
  32. > Note:
  33. > The customer uses IE6 and IE7.
  34. > This problem arises at the special WAN Network only. Our customer has
  35. > another internal production system (same application) at a LAN network,
  36. > which does not face these Exceptions.
  37. >
  38. >
  39. > Does anybody has a hint or idea what could be going on? That would be
  40. > great!
  41. > Many thanks in advance to everybody who investigates on this.
  42. >
  43. The first Exception below is harmless, since it is just Tomcat trying to
  44. tell Apache that it is ready for the next request, but Apache has stopped
  45. listening. It just results in the Thread going back to the pool. The
  46. second Exception below is from Tomcat requesting the POST body from Apache,
  47. but not getting it.
  48. My best guess is that Apache is timing out when trying to read the request
  49. body from the WAN. It then tells mod_proxy_ajp that it couldn't get the
  50. data it wants. Then mod_proxy_ajp thinks that the client has gone away, so
  51. signals this to Tomcat by closing the connection. This results in the
  52. second Exception below when Tomcat is trying to read from a closed
  53. connection.
  54. The Apache logs would be the place to look for more information.
  55. > See bellow the stack traces:
  56. >
  57. > catalina.out:
  58. > 20.11.2009 10:22:29 org.apache.jk.core.MsgContext action
  59. > WARNUNG: Error sending end packet
  60. > java.net.SocketException: Broken pipe
  61. > at java.net.SocketOutputStream.socketWrite0(Native Method)
  62. > at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
  63. > at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
  64. > at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:537)
  65. > at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:127)
  66. > at org.apache.jk.core.MsgContext.action(MsgContext.java:305)
  67. > at org.apache.coyote.Response.action(Response.java:183)
  68. > at org.apache.coyote.Response.finish(Response.java:305)
  69. > at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:205)
  70. > at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
  71. > at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
  72. > at
  73. > org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
  74. > at
  75. > org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
  76. > at
  77. > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
  78. > at java.lang.Thread.run(Thread.java:595)
  79. >
  80. > application.log:
  81. > 2009-11-20 10:22:29,042 WARN [TP-Processor2]
  82. > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/customer]
  83. > -
  84. > Exception thrown whilst processing POSTed parameters
  85. > java.io.IOException
  86. > at org.apache.jk.common.JkInputStream.receive(JkInputStream.java:205)
  87. > at org.apache.jk.common.JkInputStream.doRead(JkInputStream.java:179)
  88. > at org.apache.coyote.Request.doRead(Request.java:419)
  89. > at
  90. > org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:264)
  91. > at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:403)
  92. > at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:279)
  93. > at
  94. > org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193)
  95. > at org.apache.catalina.connector.Request.readPostBody(Request.java:2420)
  96. > at
  97. > org.apache.catalina.connector.Request.parseParameters(Request.java:2399)
  98. > at org.apache.catalina.connector.Request.getParameter(Request.java:1005)
  99. > at
  100. > org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:353)
  101. > at
  102. > COM.customer.foo.servlets.WrappedRequest.getParameter(WrappedRequest.java:134)
  103. > at
  104. > org.apache.wicket.protocol.http.servlet.ServletWebRequest.getParameter(ServletWebRequest.java:105)
  105. > at
  106. > org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:198)
  107. > at org.apache.wicket.Request.getRequestParameters(Request.java:171)
  108. > at org.apache.wicket.RequestCycle.step(RequestCycle.java:1233)
  109. > at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
  110. > at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
  111. > at
  112. > org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
  113. > at
  114. > org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:145)
  115. > at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
  116. > at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  117. > at
  118. > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
  119. > at
  120. > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  121. > at
  122. > COM.customer.foo.servlets.AdaptiveEncodingFilter.doFilter(AdaptiveEncodingFilter.java:54)
  123. > at
  124. > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  125. > at
  126. > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  127. > at
  128. > COM.customer.foo.servlets.PerformanceMonitorFilter.doFilter(PerformanceMonitorFilter.java:60)
  129. > at
  130. > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  131. > at
  132. > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  133. > at
  134. > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  135. > at
  136. > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
  137. > at
  138. > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
  139. > at
  140. > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  141. > at
  142. > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  143. > at
  144. > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:548)
  145. > at
  146. > org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:420)
  147. > at
  148. > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
  149. > at
  150. > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
  151. > at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
  152. > at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
  153. > at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
  154. > at
  155. > org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
  156. > at
  157. > org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
  158. > at
  159. > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
  160. > at java.lang.Thread.run(Thread.java:595)
  161. >
  162. >
  163. >
  164. >
  165. >
  166. > --
  167. > View this message in context:
  168. > and-Apache-2-tp26531167p26531167.html
  169. > Sent from the Tomcat - User mailing list archive at Nabble.com.
  170. ---------------------------------------------------------------------
  171. To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
  172. For additional commands, e-mail: users-help@tomcat.apache.org
阅读(1403) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~