Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response #1092

Closed
yantaowu opened this issue May 13, 2020 · 21 comments
Labels
status/invalid We don't feel this issue is valid

Comments

@yantaowu
Copy link

I use spring cloud gateway as our gateway, this exception occurs in our production environment randomly when the request arrived. I search the related issue on the github and found it had been fixed, but my reactor-netty is the latest release(0.9.7).

Steps to Reproduce

It is very difficult to reproduce,which only occurs in production environment randomly.
This is the log when the exception occurs:

2020-05-12 17:31:22.948 DEBUG [reactor-http-epoll-11] [PooledConnectionProvider] [id: 0xcbc4c890, L:/172.18.206.6:23016 - R:172.18.207.3/172.18.207.3:8151] Channel acquired, now 1 active connections and 0 inactive connections
2020-05-12 17:31:22.948 DEBUG [reactor-http-epoll-11] [HttpClientConnect] [id: 0xcbc4c890, L:/172.18.206.6:23016 - R:172.18.207.3/172.18.207.3:8151] Handler is being applied: {uri=http://172.18.207.3:8151/route, method=POST}
2020-05-12 17:31:22.948 DEBUG [reactor-http-epoll-11] [PooledConnectionProvider] [id: 0xcbc4c890, L:/172.18.206.6:23016 - R:172.18.207.3/172.18.207.3:8151] onStateChange(POST{uri=/route, connection=PooledConnection{channel=[id: 0xcbc4c890, L:/172.18.206.6:23016 - R:172.18.207.3/172.18.207.3:8151]}}, [request_prepared])
2020-05-12 17:31:22.948 DEBUG [reactor-http-epoll-11] [PooledConnectionProvider] [id: 0xcbc4c890, L:/172.18.206.6:23016 - R:172.18.207.3/172.18.207.3:8151] onStateChange(POST{uri=/route, connection=PooledConnection{channel=[id: 0xcbc4c890, L:/172.18.206.6:23016 - R:172.18.207.3/172.18.207.3:8151]}}, [request_sent])
2020-05-12 17:31:22.948 DEBUG [reactor-http-epoll-11] [PooledConnectionProvider] [id: 0xcbc4c890, L:/172.18.206.6:23016 ! R:172.18.207.3/172.18.207.3:8151] Channel closed, now 0 active connections and 0 inactive connections
2020-05-12 17:31:22.948 DEBUG [reactor-http-epoll-11] [PooledConnectionProvider] [id: 0xcbc4c890, L:/172.18.206.6:23016 ! R:172.18.207.3/172.18.207.3:8151] onStateChange(POST{uri=/route, connection=PooledConnection{channel=[id: 0xcbc4c890, L:/172.18.206.6:23016 ! R:172.18.207.3/172.18.207.3:8151]}}, [response_incomplete])
2020-05-12 17:31:22.949 WARN [reactor-http-epoll-11] [HttpClientConnect] [id: 0xcbc4c890, L:/172.18.206.6:23016 ! R:172.18.207.3/172.18.207.3:8151] The connection observed an error
reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response

The configuration of spring cloud gateway:

spring.cloud.gateway.httpclient.pool.type=fixed
spring.cloud.gateway.httpclient.pool.max-connections=1000
spring.cloud.gateway.httpclient.pool.acquire-timeout=7500
spring.cloud.gateway.httpclient.pool.max-idle-time=90s
spring.cloud.gateway.httpclient.pool.max-life-time=90s

Your Environment

  • reactor-netty: 0.9.7.RELEASE
  • netty: 4.1.49.Final
  • spring cloud gateway: 2.2.2.RELEASE
  • JVM version (javar -version): jdk 1.8
  • OS and version (eg uname -a): centos 6.7
@yantaowu yantaowu added status/need-triage A new issue that still need to be evaluated as a whole type/bug A general bug labels May 13, 2020
@violetagg violetagg removed the status/need-triage A new issue that still need to be evaluated as a whole label May 13, 2020
@violetagg
Copy link
Member

@yantaowu There might be several causes about this. Can you confirm that you do not have these issues:

#1008
#1038
#564 (comment)

@violetagg violetagg added the for/user-attention This issue needs user attention (feedback, rework, etc...) label May 13, 2020
@yantaowu
Copy link
Author

@yantaowu There might be several causes about this. Can you confirm that you do not have these issues:

#1008
#1038
#564 (comment)

Thanks a lot. I will try my best to obtain the tcp dump and have a feedback.

@violetagg
Copy link
Member

@yantaowu I'm closing this. We can reopen it if it is needed.

@violetagg violetagg removed the type/bug A general bug label May 25, 2020
@iceqing
Copy link

iceqing commented Jun 3, 2020

same problem

2020-06-03 18:18:46,385 ERROR [7a22b978d4d1866c, 7a22b978d4d1866c] [][reactor-http-epoll-2] org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler:122 - [db1e0f50-76]  500 Server Error for HTTP GET "/app/xxx/index?device=android&from=6.1.2"
reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response
        Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
        |_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]
        |_ checkpoint ⇢ org.springframework.cloud.sleuth.instrument.web.TraceWebFilter [DefaultWebFilterChain]
        |_ checkpoint ⇢ org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilterChain]
        |_ checkpoint ⇢ HTTP GET "/app/licai/message/index?device=android&from=6.1.2" [ExceptionHandlingWebHandler]
Stack trace:

@violetagg
Copy link
Member

@iceqing Did you check #1092 (comment)? If nothing from the links helps then create a new issue with a reproducible example.

@yantaowu
Copy link
Author

yantaowu commented Jun 4, 2020

@violetagg I obtain the tcp dump,if we can check the connection state before sending request,maybe resolve the problem。
log and tcp dump:

2020-06-04 06:58:09.151 WARN [reactor-http-epoll-8] [HttpClientConnect] [id: 0x483deb13, L:/172.18.206.6:39284 ! R:172.18.207.2/172.18.207.2:8151] The connection observed an error
reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response

image

@violetagg violetagg reopened this Jun 4, 2020
@violetagg
Copy link
Member

@yantaowu So the one with port 8151 is that the server? Why this RST is sent?

@yantaowu
Copy link
Author

yantaowu commented Jun 4, 2020

@violetagg The one with port 8151 is server. According to the dump, I think the server close the connection first, then the client with port 39284 send a request to the server, since the connection is closed, so return the RST to client.

@violetagg
Copy link
Member

@yantaowu Why has the server closed the connection? Are there any logs on the server?

@yantaowu
Copy link
Author

yantaowu commented Jun 4, 2020

@violetagg There are no logs on the server. I have a question, why sending a request to the server on the closed connection. Could we check the connection state before sending the request?

@yantaowu
Copy link
Author

yantaowu commented Jun 4, 2020

@violetagg The post request with path "/route" is the request to the server, but the connection has been closed before sending at this time.

@yangbongsoo
Copy link

when I made poor server that send response header only(not response body)
the result is Connection prematurely closed DURING response
cf ) #1037 (comment)

so I think that PrematureCloseException is not always a reactor-netty problem.

@violetagg
Copy link
Member

@yantaowu The connection state is checked several times before issuing the request.

  1. before acquiring from the pool
    .evictionPredicate(DEFAULT_EVICTION_PREDICATE
  2. after acquiring from the pool
  3. before sending the request
    return Mono.error(AbortedException.beforeSend());

So it is important to understand the scenario when this happens and why the server closed the connection.

@yantaowu
Copy link
Author

yantaowu commented Jun 4, 2020

@yantaowu The connection state is checked several times before issuing the request.

  1. before acquiring from the pool
    .evictionPredicate(DEFAULT_EVICTION_PREDICATE
  2. after acquiring from the pool
  3. before sending the request
    return Mono.error(AbortedException.beforeSend());

So it is important to understand the scenario when this happens and why the server closed the connection.

Thank you very much.

@ehongyu
Copy link

ehongyu commented Jun 10, 2020

+1
Got the same / similar problems from time to time in production. It happens with both the old version and the latest 0.9.7.RELEASE in Spring webflux:

nested exception is reactor.core.Exceptions$ReactiveException: reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response] with root cause
reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response
        Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:

@violetagg
Copy link
Member

@ehongyu And you checked #1092 (comment) and it is nothing from the list. Can you take a tcp dump? I would really appreciate if you start a new issue related to your use case. It might seems similar but it might appear that it is a different root cause.

@ehongyu
Copy link

ehongyu commented Jun 17, 2020

I wish I could get a tcpdump, but this annoying issue only happened once in a while on the production box and our company's production box is beyond our reach.

@iceqing
Copy link

iceqing commented Jun 19, 2020

I get a tcpdump.

2020-06-19 15:23:22,186 ERROR [183a4835e96dd39f, 183a4835e96dd39f] [][reactor-http-epoll-4] org.springframework.boot.au
toconfigure.web.reactive.error.AbstractErrorWebExceptionHandler:122 - [f762e0e8-47621]  500 Server Error for HTTP GET "
/app/licai/message/index/not_login"
reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response
        Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
        |_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]
        |_ checkpoint ⇢ org.springframework.cloud.sleuth.instrument.web.TraceWebFilter [DefaultWebFilterChain]
        |_ checkpoint ⇢ org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilter
Chain]
        |_ checkpoint ⇢ HTTP GET "/app/licai/message/index/not_login" [ExceptionHandlingWebHandler]
Stack trace:

client(10.157.122.166):

image

server(10.138.7.86):
image

@violetagg
Copy link
Member

@iceqing So do you have some logs on the server that indicate why the server closes the connection?

@violetagg
Copy link
Member

violetagg commented Jun 24, 2020

From the linked issue spring-cloud/spring-cloud-gateway#1148

It appears that the server is Tomcat with configurations

connectionTimeout | The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be presented. Use a value of -1 to indicate no (i.e. infinite) timeout. The default value is 60000 (i.e. 60 seconds) but note that the standard server.xml that ships with Tomcat sets this to 20000 (i.e. 20 seconds). Unless disableUploadTimeout is set to false, this timeout will also be used when reading the request body (if any).

and

keepAliveTimeout | The number of milliseconds this Connector will wait for another HTTP request before closing the connection. The default value is to use the value that has been set for the connectionTimeout attribute. Use a value of -1 to indicate no (i.e. infinite) timeout.

These two configurations might be a cause for a connection close.

I would recommend to configure maxIdleTime on the client side having in mind the keepAliveTimeout on Tomcat. Without such configuration Reactor Netty can receive the close event at any time between acquiring the connection from the pool and before actual sending of the request. Also you might want to switch to LIFO leasing strategy so that you will use always the most recently used connection.

@successpp
Copy link

2023-09-16 16:47:50.180 INFO 244 --- [ctor-http-nio-4] com.nari.amap.filter.AmapGatewayFilter : 输出请求接口路径:/amap-gateway-service/amap-app-service/doc.html
2023-09-16 16:47:50.222 ERROR 244 --- [ctor-http-nio-5] reactor.netty.http.server.HttpServer : [id: 0xc2ac1584, L:/172.29.136.91:12000 - R:/172.29.136.91:58395]

java.lang.NoSuchMethodError: org.springframework.http.server.reactive.ServerHttpResponse.setRawStatusCode(Ljava/lang/Integer;)Z
at org.springframework.web.reactive.function.server.DefaultServerResponseBuilder$AbstractServerResponse.writeStatusAndHeaders(DefaultServerResponseBuilder.java:356) ~[spring-webflux-5.2.15.RELEASE.jar:5.2.15.RELEASE]
at org.springframework.web.reactive.function.server.DefaultServerResponseBuilder$AbstractServerResponse.writeTo(DefaultServerResponseBuilder.java:344) ~[spring-webflux-5.2.15.RELEASE.jar:5.2.15.RELEASE]
at org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler.write(AbstractErrorWebExceptionHandler.java:353) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler.lambda$handle$2(AbstractErrorWebExceptionHandler.java:306) ~[spring-boot-autoconfigure-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:118) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onNext(FluxPeekFuseable.java:203) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1812) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:241) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:76) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:67) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:121) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2393) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:162) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2190) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:2064) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:90) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:54) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Mono.subscribe(Mono.java:4252) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onComplete(FluxSwitchIfEmpty.java:75) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxFlatMap$FlatMapMain.checkTerminated(FluxFlatMap.java:839) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:601) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxFlatMap$FlatMapMain.drain(FluxFlatMap.java:581) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxFlatMap$FlatMapMain.onComplete(FluxFlatMap.java:458) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxArray$ArraySubscription.slowPath(FluxArray.java:137) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxArray$ArraySubscription.request(FluxArray.java:99) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxFlatMap$FlatMapMain.onSubscribe(FluxFlatMap.java:364) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxArray.subscribe(FluxArray.java:53) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxArray.subscribe(FluxArray.java:59) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoFromFluxOperator.subscribe(MonoFromFluxOperator.java:81) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:150) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:67) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:76) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxConcatArray$ConcatArraySubscriber.onNext(FluxConcatArray.java:176) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2393) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2190) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:2064) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:54) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Mono.subscribe(Mono.java:4252) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxConcatArray$ConcatArraySubscriber.onComplete(FluxConcatArray.java:207) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxConcatArray.subscribe(FluxConcatArray.java:80) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Mono.subscribe(Mono.java:4252) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:97) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:100) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onError(FluxMapFuseable.java:134) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:390) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Operators.error(Operators.java:196) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoError.subscribe(MonoError.java:52) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Mono.subscribe(Mono.java:4252) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:97) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:390) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onError(MonoFlatMap.java:165) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondError(MonoFlatMap.java:185) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoFlatMap$FlatMapInner.onError(MonoFlatMap.java:251) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.onError(MonoIgnoreThen.java:268) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onError(MonoFlatMap.java:165) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onError(Operators.java:2059) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Operators.error(Operators.java:196) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoError.subscribe(MonoError.java:52) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Mono.subscribe(Mono.java:4252) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onComplete(FluxSwitchIfEmpty.java:75) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onComplete(MonoFlatMap.java:174) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoNext$NextSubscriber.onComplete(MonoNext.java:96) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.drain(FluxConcatMap.java:359) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.onSubscribe(FluxConcatMap.java:211) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:161) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:86) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Mono.subscribe(Mono.java:4252) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:253) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:51) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:150) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:67) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:76) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.innerNext(FluxConcatMap.java:274) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxConcatMap$ConcatMapInner.onNext(FluxConcatMap.java:851) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:121) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2393) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:162) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2190) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:2064) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:90) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:54) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Mono.subscribe(Mono.java:4252) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.drain(FluxConcatMap.java:441) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.onSubscribe(FluxConcatMap.java:211) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:161) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:86) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.Mono.subscribe(Mono.java:4252) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:253) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:51) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.3.17.RELEASE.jar:3.3.17.RELEASE]
at reactor.netty.http.server.HttpServerHandle.onStateChange(HttpServerHandle.java:65) ~[reactor-netty-0.9.20.RELEASE.jar:0.9.20.RELEASE]
at reactor.netty.ReactorNetty$CompositeConnectionObserver.onStateChange(ReactorNetty.java:537) [reactor-netty-0.9.20.RELEASE.jar:0.9.20.RELEASE]
at reactor.netty.tcp.TcpServerBind$ChildObserver.onStateChange(TcpServerBind.java:278) [reactor-netty-0.9.20.RELEASE.jar:0.9.20.RELEASE]
at reactor.netty.http.server.HttpServerOperations.onInboundNext(HttpServerOperations.java:475) [reactor-netty-0.9.20.RELEASE.jar:0.9.20.RELEASE]
at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:96) [reactor-netty-0.9.20.RELEASE.jar:0.9.20.RELEASE]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at reactor.netty.http.server.HttpTrafficHandler.channelRead(HttpTrafficHandler.java:191) [reactor-netty-0.9.20.RELEASE.jar:0.9.20.RELEASE]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) [netty-codec-4.1.65.Final.jar:4.1.65.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296) [netty-codec-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [netty-transport-4.1.65.Final.jar:4.1.65.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [netty-common-4.1.65.Final.jar:4.1.65.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.65.Final.jar:4.1.65.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.65.Final.jar:4.1.65.Final]
at java.lang.Thread.run(Thread.java:750) [na:1.8.0_321]

2023-09-16 16:47:50.227 WARN 244 --- [ctor-http-nio-4] r.netty.http.client.HttpClientConnect : [id: 0x0c21051a, L:0.0.0.0/0.0.0.0:58395 ! R:/172.29.136.91:12000] The connection observed an error

reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response

2023-09-16 16:47:50.236 ERROR 244 --- [ctor-http-nio-4] a.w.r.e.AbstractErrorWebExceptionHandler : [e392ca95] 500 Server Error for HTTP GET "/amap-gateway-service/amap-app-service/doc.html"

reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
|_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ HTTP GET "/amap-gateway-service/amap-app-service/doc.html" [ExceptionHandlingWebHandler]
Stack trace:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/invalid We don't feel this issue is valid
Projects
None yet
Development

No branches or pull requests

6 participants