Quarkus TLS异常:DefaultChannelPipeline]vert.x-eventloop-thread-0引发了exceptionCaught事件

问题描述

一个简单的CRUD应用程序上,当在Quarkus上配置SSL(基本配置)时,日志显示此警告(这种升温每秒重复一次)

例外

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

除了日志,一切似乎都可以正常工作!

解决方法

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

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

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