首页 > 解决方案 > Quarkus TLS 异常:DefaultChannelPipeline] (vert.x-eventloop-thread-0) 触发了 exceptionCaught() 事件

问题描述

在 Quarkus(基本配置)上配置 SSL 时,在一个简单的 CRUD 应用程序中,日志会显示此警告(此预热每秒重复一次)

例外

2020-08-26 12:49:53,067 DEBUG [io.net.han.ssl.SslHandler] (vert.x-eventloop-thread-0) [id: 0x89c3e82b, L:/10.221.49.135:8443 - R:/10.221.82.1:45028] HANDSHAKEN: protocol:TLSv1.2 cipher suite:TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
2020-08-26 12:49:53,155 WARN  [io.net.cha.DefaultChannelPipeline] (vert.x-eventloop-thread-0) An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.: java.io.IOException: Connection reset by peer
    at java.base/sun.nio.ch.FileDispatcherImpl.read0(Native Method)
    at java.base/sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
    at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276)
    at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:233)
    at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:223)
    at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:358)
    at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253)
    at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1133)
    at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Thread.java:834)

使用的配置是

quarkus.http.ssl-port=8443
quarkus.http.insecure-requests=redirect
quarkus.http.ssl.certificate.key-store-file=META-INF/keystore.jks

该应用程序部署在 Openshift 上。

如果我调试,我可以看到我在 POD 上的应用程序正在尝试连接一些 IP

java.nio.channels.SocketChannel[connected local=/XX.XX.72.42:8443 remote=/XX.XX.84.1:49516]

Where XX.XX.72.42 is the POD IP

Where XX.XX.84.1 no idea

除了日志,一切似乎都正常!

标签: ssltls1.2quarkus

解决方案


因此,如果连接已被客户端关闭(XX.XX.84.1即连接到您的应用程序的客户端的 IP 地址),这可能是正常的。

这可能不是一个真正的问题。

同意警告消息不是很好。也许在我们的跟踪器中打开一个问题,以便有人可以查看我们是否可以改进或者是否应该保持这种状态。


推荐阅读