带有图像的请求中的管道损坏写入失败网关x服务

问题描述

因此,我有一个基于netflix zuul的spring-cloud的网关API和另一个接收带有图像请求的API。 看起来像是它的大图像给了我这个例外,但我无法复制,它随大图像一起随机显示

这是gateway-api上的配置

hystrix:
  command:
    ms-verifications:
      execution.isolation.thread:
        timeoutInMilliseconds: 60000

verifications:
    url: {}
    serviceId: ms-verifications

在验证API中

hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 60000

我收到的错误

com.netflix.zuul.exception.ZuulException: Filter threw Exception\n\tat com.netflix.zuul.FilterProcessor.processZuulFilter(FilterProcessor.java:227)\n\tat com.netflix.zuul.FilterProcessor.runFilters(FilterProcessor.java:157)\n\tat com.netflix.zuul.FilterProcessor.route(FilterProcessor.java:118)\n\tat com.netflix.zuul.ZuulRunner.route(ZuulRunner.java:96)\n\tat com.netflix.zuul.http.ZuulServlet.route(ZuulServlet.java:116)\n\tat com.netflix.zuul.http.ZuulServlet.service(ZuulServlet.java:81)\n\tat org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:165)\n\tat org.springframework.cloud.netflix.zuul.web.ZuulController.handleRequest(ZuulController.java:44)\n\tat org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52)\n\tat org.springframework.web.servlet.dispatcherServlet.dodispatch(dispatcherServlet.java:1038)\n\tat org.springframework.web.servlet.dispatcherServlet.doService(dispatcherServlet.java:942)\n\tat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)\n\tat org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:665)\n\tat org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:750)\n\tat io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)\n\tat io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)\n\tat com.picpay.filter.RequestTimeLoggingFilter.doFilterInternal(RequestTimeLoggingFilter.java:37)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)\n\tat io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)\n\tat org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:90)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)\n\tat io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)\n\tat org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)\n\tat io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)\n\tat org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)\n\tat io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)\n\tat org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)\n\tat io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)\n\tat org.springframework.boot.actuate.metrics.web.servlet.WebMvcmetricsFilter.filterandRecordMetrics(WebMvcmetricsFilter.java:117)\n\tat org.springframework.boot.actuate.metrics.web.servlet.WebMvcmetricsFilter.doFilterInternal(WebMvcmetricsFilter.java:106)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)\n\tat io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)\n\tat org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)\n\tat io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)\n\tat io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)\n\tat io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)\n\tat io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)\n\tat io.undertow.servlet.handlers.ServletdispatchingHandler.handleRequest(ServletdispatchingHandler.java:36)\n\tat io.undertow.servlet.handlers.security.SSLinformationAssociationHandler.handleRequest(SSLinformationAssociationHandler.java:132)\n\tat io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\n\tat io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)\n\tat io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)\n\tat io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)\n\tat io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)\n\tat io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\n\tat io.undertow.servlet.handlers.ServletinitialHandler.handleFirstRequest(ServletinitialHandler.java:292)\n\tat io.undertow.servlet.handlers.ServletinitialHandler.access$100(ServletinitialHandler.java:81)\n\tat io.undertow.servlet.handlers.ServletinitialHandler$2.call(ServletinitialHandler.java:138)\n\tat io.undertow.servlet.handlers.ServletinitialHandler$2.call(ServletinitialHandler.java:135)\n\tat io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)\n\tat io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)\n\tat io.undertow.servlet.handlers.ServletinitialHandler.dispatchRequest(ServletinitialHandler.java:272)\n\tat io.undertow.servlet.handlers.ServletinitialHandler.access$000(ServletinitialHandler.java:81)\n\tat io.undertow.servlet.handlers.ServletinitialHandler$1.handleRequest(ServletinitialHandler.java:104)\n\tat io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)\n\tat io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\nCaused by: org.springframework.cloud.netflix.zuul.util.ZuulRuntimeException: com.netflix.zuul.exception.ZuulException: Forwarding error\n\tat org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.run(SimpleHostRoutingFilter.java:223)\n\tat com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:117)\n\tat com.netflix.zuul.FilterProcessor.processZuulFilter(FilterProcessor.java:193)\n\t... 74 common frames omitted\nCaused by: com.netflix.zuul.exception.ZuulException: Forwarding error\n\tat org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.handleException(SimpleHostRoutingFilter.java:243)\n\t... 77 common frames omitted\nCaused by: org.apache.http.client.ClientProtocolException: null\n\tat org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:187)\n\tat org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118)\n\tat org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.forwardRequest(SimpleHostRoutingFilter.java:393)\n\tat org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.forward(SimpleHostRoutingFilter.java:312)\n\tat org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.run(SimpleHostRoutingFilter.java:218)\n\t... 76 common frames omitted\nCaused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity\n\tat org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:108)\n\tat org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)\n\t... 80 common frames omitted\nCaused by: java.net.socketException: broken pipe (Write Failed)\n\tat java.net.socketoutputStream.socketWrite0(Native Method)\n\tat java.net.socketoutputStream.socketWrite(SocketoutputStream.java:111)\n\tat java.net.socketoutputStream.write(SocketoutputStream.java:155)\n\tat org.apache.http.impl.io.SessionOutputBufferImpl.streamWrite(SessionOutputBufferImpl.java:124)\n\tat org.apache.http.impl.io.SessionOutputBufferImpl.flushBuffer(SessionOutputBufferImpl.java:136)\n\tat org.apache.http.impl.io.SessionOutputBufferImpl.write(SessionOutputBufferImpl.java:167)\n\tat org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:113)\n\tat org.apache.http.entity.InputStreamEntity.writeto(InputStreamEntity.java:144)\n\tat org.apache.http.impl.execchain.RequestEntityProxy.writeto(RequestEntityProxy.java:121)\n\tat org.apache.http.impl.DefaultBHttpClientConnection.sendRequestEntity(DefaultBHttpClientConnection.java:156)\n\tat org.apache.http.impl.conn.CPoolProxy.sendRequestEntity(CPoolProxy.java:160)\n\tat org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:238)\n\tat org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)\n\tat org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)\n\tat org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)\n\tat org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)\n\t... 81 common frames omitted\n

我已经增加了两端的超时时间,但是似乎没有任何解决方法 在我的日志中,我在请求时看到了21ms的错误,而在42000ms时看到了成功的错误

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)