`

Tomcat与apache2集群的问题

    博客分类:
  • JAVA
 
阅读更多

 

最近在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)

 

 

最后在tomcat的邮件列表里面找到的原因:

http://mail-archives.apache.org/mod_mbox/tomcat-users/200911.mbox/%3Chen6qc$3rg$1@ger.gmane.org%3E

 

"ArthIT" <arthur.hupka@innovations.de> 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: 
> http://old.nabble.com/Problems-with-mod_proxy_ajp-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

 

 

 

 

分享到:
评论
1 楼 zhujianbogo 2013-07-26  
什么邮件列表,能说下解决方案吗? 谢谢 。 我也遇到这个问题了。

相关推荐

    tomcat+apache集群配置实例

    【标题】:“Tomcat+Apache集群配置实例” 在IT领域,服务器集群是一种常见的高可用性和负载均衡解决方案。这里我们将深入探讨如何配置一个基于Tomcat和Apache的集群环境,以提高Web应用的服务质量和应对高流量场景...

    apache与tomcat负载集群的实现

    在构建高性能、高可用性的Web服务时,Apache与Tomcat的组合使用是非常常见的策略,尤其在需要实现负载平衡和集群的场景下。Apache通常作为前端服务器处理静态内容,而Tomcat则作为后端应用服务器处理动态请求。接...

    Tomcat+Apache+JK集群

    【标题】"Tomcat+Apache+JK集群"指的是在Web服务器架构中,通过Apache HTTP Server与Tomcat应用服务器结合,并利用JK模块实现负载均衡和高可用性的集群部署方式。这种方式可以提升系统的性能和稳定性,应对高并发...

    apache Tomcat 集群 访问问题

    Apache Tomcat集群访问问题主要涉及的是在高并发或者负载均衡场景下,如何通过配置多个Tomcat实例来提高Web服务的可用性和性能。集群允许将请求分发到多个服务器上,从而实现负载均衡,并且提供了故障转移的能力,...

    apache+tomcat集群配置

    Apache + Tomcat 集群配置是指将 Apache 服务器与 Tomcat 服务器集成,以提高服务器的性能和可扩展性。本文将详细介绍如何配置 Apache + Tomcat 集群,包括安装 Apache 和 Tomcat 服务器、配置 mod_jk 模块、配置 ...

    tomcat .apache2.0集群配置资料

    以下是对"tomcat .apache2.0集群配置资料"这一主题的详细说明。 **1. Tomcat集群的概念** Tomcat集群是指将多个独立的Tomcat实例通过负载均衡技术连接起来,共同处理来自客户端的请求。这种方式可以提升系统处理...

    Apache+Tomcat服务器集群配置详细步骤

    ### Apache+Tomcat服务器集群配置详细步骤 #### 一、引言 在现代Web开发中,随着业务规模的不断扩大和用户需求的日益增长,单一服务器往往难以满足高性能、高可靠性的要求。为了应对这一挑战,通常采用Apache+...

    最新的tomcat 和apache 整合 集群 优化

    ### 最新的Tomcat与Apache整合集群优化 #### 一、Apache与Tomcat的整合 Apache与Tomcat的整合主要是为了实现动态内容与静态内容的有效分离,通过Apache作为前端的反向代理服务器,来处理静态资源的请求,而将动态...

    基于Xen虚拟机实现Apache tomcat 集群搭建

    基于Xen虚拟机实现Apache Tomcat集群搭建的知识点如下: 1. Xen虚拟机技术:Xen是一个开源的虚拟机监视器,允许用户在同一台物理主机上运行多个虚拟机,每个虚拟机可以运行不同的操作系统。Xen具有高性能和高扩展性...

    apache tomcat负载集群

    apache tomcat负载集群,appache负载,tomcat负载

    Apache Tomcat 集群

    2. **设置通信机制**:Tomcat集群通过通道(Channel)进行节点间的通信。常见的通信机制有基于TCP的`TcpChannel`,基于Multicast的`SimpleTcpCluster`等。你需要根据网络环境选择合适的通信方式,并在`Channel`元素...

    tomcat + apache + memcached 集群jar包

    在与Tomcat结合使用时,Apache可以接收来自用户的HTTP请求,然后根据预设策略将这些请求转发到后端的Tomcat服务器集群,以实现更高效的资源利用和故障转移。Apache可以通过模块如mod_proxy来实现这一功能。 接着,...

    tomcat+apache+jk集群和负载均衡

    在IT领域,特别是Web服务架构中,通过使用Tomcat、Apache和JK代理模块实现集群与负载均衡是一种常见的优化策略,旨在提升系统性能、稳定性和可用性。以下是对标题“tomcat+apache+jk集群和负载均衡”以及描述...

Global site tag (gtag.js) - Google Analytics