spring-cloud / spring-cloud-gateway

An API Gateway built on Spring Framework and Spring Boot providing routing and more.
http://cloud.spring.io
Apache License 2.0
4.52k stars 3.32k forks source link

Spring cloud gateway error SSL/TLS when enable http2 + ssl together #3531

Open hoangdangduy opened 4 weeks ago

hoangdangduy commented 4 weeks ago

I just created a spring cloud gateway project. I enable http2 + SSL together, then call health check it throws a log error: Suppressed: io.netty.handler.ssl.StacklessSSLHandshakeException: Connection closed while SSL/TLS handshake was in progress

my version of project:

url call health check: https://localhost:9968/healthcheck/readiness

this is my project to reproduce error: https://github.com/hoangdangduy/spring-cloud-gateway

thanks in advance for your help.

file application.yaml:

server:
  port: 9968
  http2:
    enabled: true
  ssl:
    key-store: classpath:keystore/key.keystore
    key-store-password: mypassword
    key-store-type: PKCS12
    enabled: true

This detail log in console:

2024-09-19T20:48:02.154+07:00 DEBUG 25484 --- [ctor-http-nio-3] reactor.netty.tcp.SslProvider            : [8cfd6716, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:62242] SSL enabled using engine io.netty.handler.ssl.JdkAlpnSslEngine@da7e224
2024-09-19T20:48:02.154+07:00 DEBUG 25484 --- [ctor-http-nio-2] reactor.netty.tcp.SslProvider            : [087a9e8f, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:62241] SSL enabled using engine io.netty.handler.ssl.JdkAlpnSslEngine@5a4950ac
2024-09-19T20:48:02.166+07:00 DEBUG 25484 --- [ctor-http-nio-2] io.netty.util.Recycler                   : -Dio.netty.recycler.maxCapacityPerThread: 4096
2024-09-19T20:48:02.166+07:00 DEBUG 25484 --- [ctor-http-nio-2] io.netty.util.Recycler                   : -Dio.netty.recycler.ratio: 8
2024-09-19T20:48:02.166+07:00 DEBUG 25484 --- [ctor-http-nio-2] io.netty.util.Recycler                   : -Dio.netty.recycler.chunkSize: 32
2024-09-19T20:48:02.166+07:00 DEBUG 25484 --- [ctor-http-nio-2] io.netty.util.Recycler                   : -Dio.netty.recycler.blocking: false
2024-09-19T20:48:02.166+07:00 DEBUG 25484 --- [ctor-http-nio-2] io.netty.util.Recycler                   : -Dio.netty.recycler.batchFastThreadLocalOnly: true
2024-09-19T20:48:02.169+07:00 DEBUG 25484 --- [ctor-http-nio-3] r.netty.transport.TransportConfig        : [8cfd6716, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:62242] Initialized pipeline DefaultChannelPipeline{(reactor.left.sslHandler = io.netty.handler.ssl.SslHandler), (reactor.left.sslReader = reactor.netty.tcp.SslProvider$SslReadHandler), (reactor.left.h2OrHttp11Codec = reactor.netty.http.server.HttpServerConfig$H2OrHttp11Codec), (reactor.right.reactiveBridge = reactor.netty.channel.ChannelOperationsHandler)}
2024-09-19T20:48:02.169+07:00 DEBUG 25484 --- [ctor-http-nio-2] r.netty.transport.TransportConfig        : [087a9e8f, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:62241] Initialized pipeline DefaultChannelPipeline{(reactor.left.sslHandler = io.netty.handler.ssl.SslHandler), (reactor.left.sslReader = reactor.netty.tcp.SslProvider$SslReadHandler), (reactor.left.h2OrHttp11Codec = reactor.netty.http.server.HttpServerConfig$H2OrHttp11Codec), (reactor.right.reactiveBridge = reactor.netty.channel.ChannelOperationsHandler)}
2024-09-19T20:48:02.184+07:00  WARN 25484 --- [ctor-http-nio-2] .s.ApplicationProtocolNegotiationHandler : [id: 0x087a9e8f, L:/[0:0:0:0:0:0:0:1]:9968 ! R:/[0:0:0:0:0:0:0:1]:62241] Failed to select the application-level protocol:

java.nio.channels.ClosedChannelException: null
    at io.netty.handler.ssl.SslHandler.channelInactive(SslHandler.java:1156) ~[netty-handler-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:303) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:281) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:274) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1402) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:301) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:281) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:900) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.AbstractChannel$AbstractUnsafe$7.run(AbstractChannel.java:811) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.AbstractEventExecutor.runTask$$$capture(AbstractEventExecutor.java:173) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:166) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:566) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
    Suppressed: io.netty.handler.ssl.StacklessSSLHandshakeException: Connection closed while SSL/TLS handshake was in progress
        at io.netty.handler.ssl.SslHandler.channelInactive(Unknown Source) ~[netty-handler-4.1.110.Final.jar:4.1.110.Final]

2024-09-19T20:48:02.185+07:00 DEBUG 25484 --- [ctor-http-nio-2] r.netty.transport.ServerTransport        : [087a9e8f, L:/[0:0:0:0:0:0:0:1]:9968 ! R:/[0:0:0:0:0:0:0:1]:62241] onUncaughtException(SimpleConnection{channel=[id: 0x087a9e8f, L:/[0:0:0:0:0:0:0:1]:9968 ! R:/[0:0:0:0:0:0:0:1]:62241]})

java.nio.channels.ClosedChannelException: null
    at io.netty.handler.ssl.SslHandler.channelInactive(SslHandler.java:1156) ~[netty-handler-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:303) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:281) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:274) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1402) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:301) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:281) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:900) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.AbstractChannel$AbstractUnsafe$7.run(AbstractChannel.java:811) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.AbstractEventExecutor.runTask$$$capture(AbstractEventExecutor.java:173) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:166) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:566) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
    Suppressed: io.netty.handler.ssl.StacklessSSLHandshakeException: Connection closed while SSL/TLS handshake was in progress
        at io.netty.handler.ssl.SslHandler.channelInactive(Unknown Source) ~[netty-handler-4.1.110.Final.jar:4.1.110.Final]

2024-09-19T20:48:02.263+07:00 DEBUG 25484 --- [ctor-http-nio-3] io.netty.handler.ssl.SslHandler          : [id: 0x8cfd6716, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:62242] HANDSHAKEN: protocol:TLSv1.3 cipher suite:TLS_AES_128_GCM_SHA256
2024-09-19T20:48:02.263+07:00 DEBUG 25484 --- [ctor-http-nio-3] r.netty.http.server.HttpServerConfig     : [8cfd6716, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:62242] Negotiated application-level protocol [h2]
2024-09-19T20:48:02.334+07:00 DEBUG 25484 --- [ctor-http-nio-3] i.netty.channel.DefaultChannelPipeline   : Discarded inbound message DefaultHttp2SettingsFrame(settings={ENABLE_PUSH=0}) that reached at the tail of the pipeline. Please check your pipeline configuration.
2024-09-19T20:48:02.334+07:00 DEBUG 25484 --- [ctor-http-nio-3] i.netty.channel.DefaultChannelPipeline   : Discarded message pipeline : [reactor.left.sslHandler, reactor.left.httpCodec, reactor.left.h2MultiplexHandler, DefaultChannelPipeline$TailContext#0]. Channel : [id: 0x8cfd6716, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:62242].
2024-09-19T20:48:02.359+07:00 DEBUG 25484 --- [ctor-http-nio-3] r.n.http.server.HttpServerOperations     : [8cfd6716, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:62242](H2 - 1) New HTTP/2 stream
2024-09-19T20:48:02.360+07:00 DEBUG 25484 --- [ctor-http-nio-3] r.netty.http.server.HttpServerConfig     : [8cfd6716, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:62242](H2 - 1) Initialized HTTP/2 stream pipeline AbstractHttp2StreamChannel$3{(reactor.left.h2ToHttp11Codec = io.netty.handler.codec.http2.Http2StreamFrameToHttpObjectCodec), (reactor.left.httpTrafficHandler = reactor.netty.http.server.Http2StreamBridgeServerHandler), (reactor.right.reactiveBridge = reactor.netty.channel.ChannelOperationsHandler)}
2024-09-19T20:48:02.395+07:00 DEBUG 25484 --- [ctor-http-nio-3] reactor.netty.http.server.HttpServer     : [8cfd6716/1-1, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:62242] Handler is being applied: org.springframework.http.server.reactive.ReactorHttpHandlerAdapter@7bc13a46
2024-09-19T20:48:02.427+07:00 TRACE 25484 --- [ctor-http-nio-3] o.s.c.g.f.WeightCalculatorWebFilter      : Weights attr: {}
2024-09-19T20:48:02.510+07:00 DEBUG 25484 --- [ctor-http-nio-3] r.n.http.server.HttpServerOperations     : [8cfd6716/1-1, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:62242] Last HTTP packet was sent, terminating the channel
2024-09-19T20:48:02.511+07:00 DEBUG 25484 --- [ctor-http-nio-3] r.netty.channel.ChannelOperations        : [8cfd6716/1-1, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:62242] [HttpServer] Channel inbound receiver cancelled (operation cancelled).
2024-09-19T20:48:02.514+07:00 DEBUG 25484 --- [ctor-http-nio-3] r.n.http.server.HttpServerOperations     : [8cfd6716/1-1, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:62242] Last HTTP response frame
2024-09-19T20:48:02.516+07:00 TRACE 25484 --- [ctor-http-nio-3] r.netty.channel.ChannelOperations        : [8cfd6716, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:62242](H2 - 1) Disposing ChannelOperation from a channel

java.lang.Exception: ChannelOperation terminal stack
    at reactor.netty.channel.ChannelOperations.terminate(ChannelOperations.java:492) ~[reactor-netty-core-1.1.19.jar:1.1.19]
    at io.netty.util.concurrent.AbstractEventExecutor.runTask$$$capture(AbstractEventExecutor.java:173) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:166) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:566) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]

2024-09-19T20:48:02.518+07:00 DEBUG 25484 --- [ctor-http-nio-3] i.netty.channel.DefaultChannelPipeline   : Discarded inbound message DefaultHttp2SettingsAckFrame that reached at the tail of the pipeline. Please check your pipeline configuration.
2024-09-19T20:48:02.518+07:00 DEBUG 25484 --- [ctor-http-nio-3] i.netty.channel.DefaultChannelPipeline   : Discarded message pipeline : [reactor.left.sslHandler, reactor.left.httpCodec, reactor.left.h2MultiplexHandler, DefaultChannelPipeline$TailContext#0]. Channel : [id: 0x8cfd6716, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:62242].
ctlove0523 commented 3 weeks ago

I run your code,it works well.one request log like

2024-09-24T18:58:29.388+08:00 DEBUG 34560 --- [ctor-http-nio-3] r.n.http.server.HttpServerOperations     : [43d3365d, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:54109] Increasing pending responses count: 1
2024-09-24T18:58:29.388+08:00 DEBUG 34560 --- [ctor-http-nio-3] reactor.netty.http.server.HttpServer     : [43d3365d-3, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:54109] Handler is being applied: org.springframework.http.server.reactive.ReactorHttpHandlerAdapter@65e218b7
2024-09-24T18:58:29.389+08:00 TRACE 34560 --- [ctor-http-nio-3] o.s.c.g.f.WeightCalculatorWebFilter      : Weights attr: {}
2024-09-24T18:58:29.390+08:00 DEBUG 34560 --- [ctor-http-nio-3] r.n.http.server.HttpServerOperations     : [43d3365d-3, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:54109] Decreasing pending responses count: 0
2024-09-24T18:58:29.390+08:00 DEBUG 34560 --- [ctor-http-nio-3] r.n.http.server.HttpServerOperations     : [43d3365d-3, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:54109] Last HTTP packet was sent, terminating the channel
2024-09-24T18:58:29.390+08:00 DEBUG 34560 --- [ctor-http-nio-3] r.netty.channel.ChannelOperations        : [43d3365d-3, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:54109] [HttpServer] Channel inbound receiver cancelled (operation cancelled).
2024-09-24T18:58:29.390+08:00 DEBUG 34560 --- [ctor-http-nio-3] r.n.http.server.HttpServerOperations     : [43d3365d-3, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:54109] Last HTTP response frame
2024-09-24T18:58:29.391+08:00 TRACE 34560 --- [ctor-http-nio-3] r.netty.channel.ChannelOperations        : [43d3365d, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:54109] Disposing ChannelOperation from a channel

java.lang.Exception: ChannelOperation terminal stack
    at reactor.netty.channel.ChannelOperations.terminate(ChannelOperations.java:492) ~[reactor-netty-core-1.1.19.jar:1.1.19]
    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:566) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
    at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
hoangdangduy commented 3 weeks ago

@ctlove0523 it can run but why have error log? how to prevent log error appear? Could you describle that error?

I run your code,it works well.one request log like

2024-09-24T18:58:29.388+08:00 DEBUG 34560 --- [ctor-http-nio-3] r.n.http.server.HttpServerOperations     : [43d3365d, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:54109] Increasing pending responses count: 1
2024-09-24T18:58:29.388+08:00 DEBUG 34560 --- [ctor-http-nio-3] reactor.netty.http.server.HttpServer     : [43d3365d-3, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:54109] Handler is being applied: org.springframework.http.server.reactive.ReactorHttpHandlerAdapter@65e218b7
2024-09-24T18:58:29.389+08:00 TRACE 34560 --- [ctor-http-nio-3] o.s.c.g.f.WeightCalculatorWebFilter      : Weights attr: {}
2024-09-24T18:58:29.390+08:00 DEBUG 34560 --- [ctor-http-nio-3] r.n.http.server.HttpServerOperations     : [43d3365d-3, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:54109] Decreasing pending responses count: 0
2024-09-24T18:58:29.390+08:00 DEBUG 34560 --- [ctor-http-nio-3] r.n.http.server.HttpServerOperations     : [43d3365d-3, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:54109] Last HTTP packet was sent, terminating the channel
2024-09-24T18:58:29.390+08:00 DEBUG 34560 --- [ctor-http-nio-3] r.netty.channel.ChannelOperations        : [43d3365d-3, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:54109] [HttpServer] Channel inbound receiver cancelled (operation cancelled).
2024-09-24T18:58:29.390+08:00 DEBUG 34560 --- [ctor-http-nio-3] r.n.http.server.HttpServerOperations     : [43d3365d-3, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:54109] Last HTTP response frame
2024-09-24T18:58:29.391+08:00 TRACE 34560 --- [ctor-http-nio-3] r.netty.channel.ChannelOperations        : [43d3365d, L:/[0:0:0:0:0:0:0:1]:9968 - R:/[0:0:0:0:0:0:0:1]:54109] Disposing ChannelOperation from a channel

java.lang.Exception: ChannelOperation terminal stack
  at reactor.netty.channel.ChannelOperations.terminate(ChannelOperations.java:492) ~[reactor-netty-core-1.1.19.jar:1.1.19]
  at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
  at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
  at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
  at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:566) ~[netty-transport-4.1.110.Final.jar:4.1.110.Final]
  at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
  at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
  at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.110.Final.jar:4.1.110.Final]
  at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
ctlove0523 commented 3 weeks ago

It is because client close connection two fast,you can write one http client then make a call and not close connection