加载中…
个人资料
宁静致远3577
宁静致远3577
  • 博客等级:
  • 博客积分:0
  • 博客访问:90,407
  • 关注人气:2
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
相关博文
推荐博文
正文 字体大小:

org.apache.catalina.connector.ClientAbortException:java.io.IOException:断开的管道

(2020-07-14 07:51:44)
标签:

it

教育

文化

分类: Spring/cloud

org.apache.catalina.connector.ClientAbortException: java.io.IOException: 断开的管道


当把项目Nginx作负载均衡时,有些时间较长的请求,Tomcat就报如下错误:

org.apache.catalina.connector.ClientAbortException: java.io.IOException: 断开的管道 at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer. at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk. at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer. at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer. at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream. at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder. at sun.nio.cs.StreamEncoder.flush(StreamEncoder. at at org.springframework.util.StreamUtils.copy(StreamUtils. at org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter. at org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter. at org.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter. at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor. at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor. at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor. at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite. at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod. at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter. at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter. at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter. at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet. at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet. at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet. at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet. at at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet. at at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain. at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain. at org.jasig.cas.client.util.AssertionThreadLocalFilter.doFilter(AssertionThreadLocalFilter. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain. at org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain. at com.bfd.filter.CASFilter.doFilter(CASFilter. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain. at org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain. at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain. at com.bfd.filter.CrossDomainFilter.doFilter(CrossDomainFilter. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain. at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain. at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain. at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve. at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve. at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase. at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve. at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve. at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve. at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter. at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor. at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol. at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint. at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint. at at at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread. at Caused by: java.io.IOException: 断开的管道 at sun.nio.ch.FileDispatcherImpl.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(SocketDispatcher. at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil. at sun.nio.ch.IOUtil.write(IOUtil. at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl. at org.apache.tomcat.util.net.NioChannel.write(NioChannel. at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector. at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool. at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer. at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer. at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer. at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer. at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter. at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer. at org.apache.coyote.Response.doWrite(Response. at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer. ... 73 mo

如上报错原因就是连接断开了。 具体错在哪里呐: 最后发现问题在Nginx,发现Nginx的连接超时时间设计的太短了,当服务器处理时间比较长时,等返回结果时,Nginx端已经超时断链了,Tomcat就报错了。解决方法就是把Nginx时间调大一点,就行。

0

阅读 评论 收藏 转载 喜欢 打印举报/Report
  • 评论加载中,请稍候...
发评论

    发评论

    以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

      

    新浪BLOG意见反馈留言板 电话:4000520066 提示音后按1键(按当地市话标准计费) 欢迎批评指正

    新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 会员注册 | 产品答疑

    新浪公司 版权所有