You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by GitBox <gi...@apache.org> on 2022/12/23 03:32:46 UTC

[GitHub] [shenyu] key9527 opened a new issue, #4280: [BUG] divide forward https request will cause "Connection prematurely closed BEFORE response" Above 2.5.0 version

key9527 opened a new issue, #4280:
URL: https://github.com/apache/shenyu/issues/4280

   ### Is there an existing issue for this?
   
   - [X] I have searched the existing issues
   
   ### Current Behavior
   
   2022-12-23 11:13:42 [reactor-http-nio-2] ERROR org.apache.shenyu.web.handler.GlobalErrorHandler - handle error: [58ff4cf6-7] Resolved [WebClientRequestException: Connection prematurely closed BEFORE response; nested exception is reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response] for HTTP POST /shenyu-open-api-uat/edp/to/outside/103
   org.springframework.web.reactive.function.client.WebClientRequestException: Connection prematurely closed BEFORE response; nested exception is reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response
   	at org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction.lambda$wrapException$9(ExchangeFunctions.java:141)
   	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
   Error has been observed at the following site(s):
   	*__checkpoint ⇢ Request to POST https://lixin.gacbusiness.com.cn/shenyu-open-api-uat/edp/to/outside/103 [DefaultWebClient]
   	*__checkpoint ⇢ org.apache.shenyu.web.configuration.ErrorHandlerConfiguration$1 [DefaultWebFilterChain]
   	*__checkpoint ⇢ org.apache.shenyu.web.filter.FileSizeFilter [DefaultWebFilterChain]
   	*__checkpoint ⇢ org.apache.shenyu.web.filter.CrossFilter [DefaultWebFilterChain]
   	*__checkpoint ⇢ org.springframework.security.web.server.authorization.AuthorizationWebFilter [DefaultWebFilterChain]
   	*__checkpoint ⇢ org.springframework.security.web.server.authorization.ExceptionTranslationWebFilter [DefaultWebFilterChain]
   	*__checkpoint ⇢ org.springframework.security.web.server.authentication.logout.LogoutWebFilter [DefaultWebFilterChain]
   	*__checkpoint ⇢ org.springframework.security.web.server.savedrequest.ServerRequestCacheWebFilter [DefaultWebFilterChain]
   	*__checkpoint ⇢ org.springframework.security.web.server.context.SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
   	*__checkpoint ⇢ org.springframework.security.web.server.context.ReactorContextWebFilter [DefaultWebFilterChain]
   	*__checkpoint ⇢ org.springframework.security.web.server.header.HttpHeaderWriterWebFilter [DefaultWebFilterChain]
   	*__checkpoint ⇢ org.springframework.security.config.web.server.ServerHttpSecurity$ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
   	*__checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
   	*__checkpoint ⇢ org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilterChain]
   	*__checkpoint ⇢ HTTP POST "/shenyu-open-api-uat/edp/to/outside/103" [ExceptionHandlingWebHandler]
   Original Stack Trace:
   		at org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction.lambda$wrapException$9(ExchangeFunctions.java:141)
   		at reactor.core.publisher.MonoErrorSupplied.subscribe(MonoErrorSupplied.java:55)
   		at reactor.core.publisher.Mono.subscribe(Mono.java:4400)
   		at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:103)
   		at reactor.core.publisher.FluxPeek$PeekSubscriber.onError(FluxPeek.java:222)
   		at reactor.core.publisher.FluxPeek$PeekSubscriber.onError(FluxPeek.java:222)
   		at reactor.core.publisher.FluxPeek$PeekSubscriber.onError(FluxPeek.java:222)
   		at reactor.core.publisher.MonoNext$NextSubscriber.onError(MonoNext.java:93)
   		at reactor.core.publisher.MonoFlatMapMany$FlatMapManyMain.onError(MonoFlatMapMany.java:204)
   		at reactor.core.publisher.SerializedSubscriber.onError(SerializedSubscriber.java:124)
   		at reactor.core.publisher.FluxRetryWhen$RetryWhenMainSubscriber.whenError(FluxRetryWhen.java:225)
   		at reactor.core.publisher.FluxRetryWhen$RetryWhenOtherSubscriber.onError(FluxRetryWhen.java:274)
   		at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.drain(FluxConcatMap.java:415)
   		at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.onNext(FluxConcatMap.java:251)
   		at reactor.core.publisher.EmitterProcessor.drain(EmitterProcessor.java:491)
   		at reactor.core.publisher.EmitterProcessor.tryEmitNext(EmitterProcessor.java:299)
   		at reactor.core.publisher.SinkManySerialized.tryEmitNext(SinkManySerialized.java:100)
   		at reactor.core.publisher.InternalManySink.emitNext(InternalManySink.java:27)
   		at reactor.core.publisher.FluxRetryWhen$RetryWhenMainSubscriber.onError(FluxRetryWhen.java:190)
   		at reactor.core.publisher.MonoCreate$DefaultMonoSink.error(MonoCreate.java:201)
   		at reactor.netty.http.client.HttpClientConnect$HttpObserver.onUncaughtException(HttpClientConnect.java:399)
   		at reactor.netty.ReactorNetty$CompositeConnectionObserver.onUncaughtException(ReactorNetty.java:670)
   		at reactor.netty.resources.DefaultPooledConnectionProvider$DisposableAcquire.onUncaughtException(DefaultPooledConnectionProvider.java:205)
   		at reactor.netty.resources.DefaultPooledConnectionProvider$PooledConnection.onUncaughtException(DefaultPooledConnectionProvider.java:454)
   		at reactor.netty.http.client.HttpClientOperations.onInboundClose(HttpClientOperations.java:294)
   		at reactor.netty.channel.ChannelOperationsHandler.channelInactive(ChannelOperationsHandler.java:73)
   		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
   		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
   		at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
   		at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelInactive(CombinedChannelDuplexHandler.java:418)
   		at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:392)
   		at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:357)
   		at io.netty.handler.codec.http.HttpClientCodec$Decoder.channelInactive(HttpClientCodec.java:326)
   		at io.netty.channel.CombinedChannelDuplexHandler.channelInactive(CombinedChannelDuplexHandler.java:221)
   		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
   		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
   		at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
   		at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:392)
   		at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:357)
   		at io.netty.handler.ssl.SslHandler.channelInactive(SslHandler.java:1074)
   		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
   		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
   		at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
   		at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1405)
   		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
   		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
   		at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:901)
   		at io.netty.channel.AbstractChannel$AbstractUnsafe$7.run(AbstractChannel.java:813)
   		at io.netty.util.concurrent.AbstractEventExecutor.runTask$$$capture(AbstractEventExecutor.java:174)
   		at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java)
   		at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:167)
   		at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java)
   		at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
   		at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
   		at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995)
   		at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
   		at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
   		at java.lang.Thread.run(Thread.java:748)
   Caused by: reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response
   
   ### Expected Behavior
   
   查了很多资料,在shenyu的issues里也搜到了,该问题在低版本已经解决了,但进入2.5.0,springboot、netty等版本大面积升级以后,这个问题又复现了~ 
   
   ### Steps To Reproduce
   
   1、拉取最新的apache-shenyu代码,2.5.0+;
   2、本地启动admin和bootstrap;
   3、在divide中配置一个https目标的转发策略;
   4、本地postman调用。
   
   注:2.4.3及以下版本正常,仅2.5.0以上版本,且配置的是https目标转发时,才会复现。
   
   ### Environment
   
   ```markdown
   ShenYu version(s): 2.5.0+
   ```
   
   
   ### Debug logs
   
   _No response_
   
   ### Anything else?
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shenyu] yu199195 closed issue #4280: [BUG] divide forward https request will cause "Connection prematurely closed BEFORE response" Above 2.5.0 version

Posted by "yu199195 (via GitHub)" <gi...@apache.org>.
yu199195 closed issue #4280: [BUG] divide forward https request will cause "Connection prematurely closed BEFORE response"  Above 2.5.0 version
URL: https://github.com/apache/shenyu/issues/4280


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shenyu] key9527 commented on issue #4280: [BUG] divide forward https request will cause "Connection prematurely closed BEFORE response" Above 2.5.0 version

Posted by GitBox <gi...@apache.org>.
key9527 commented on issue #4280:
URL: https://github.com/apache/shenyu/issues/4280#issuecomment-1364828765

   > I will focus on it.
   
   thks,I hope you can fix it as soon as possible. I'm glad to use the lastst version.  unfortunately,i have no choice but to use the lower version because this bug.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shenyu] moremind commented on issue #4280: [BUG] divide forward https request will cause "Connection prematurely closed BEFORE response" Above 2.5.0 version

Posted by GitBox <gi...@apache.org>.
moremind commented on issue #4280:
URL: https://github.com/apache/shenyu/issues/4280#issuecomment-1364042474

   I will focus on it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org