动物园管理员法定人数。 PKIX 路径构建失败。无法找到到请求目标的有效证书路径

Zookeeper quorum. PKIX path building failed. Unable to find valid certification path to requested target

Zookeeper 充当服务器并配置了具有服务器证书的密钥库。我的密钥库中的证书链如下所示:

MyIntermediateCert (signed by MyRootCertificate)
     MyZookeeperCertificate (signed by MyIntermediateCert)

定义的另一个参数是truststore,其中我只有root CA MyRootCertificate。

虽然 zk 正在启动,但我在日志中看到外部连接配置了 TLS 一切正常,但是当 zk 的节点尝试建立仲裁并尝试相互通信时 - 我在客户端之间的 TLS 握手时收到经典的 TLS 异常和服务器。

Exception caught
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468)
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
        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)

ssl.quorum.hostnameVerification 是假的,我不需要节点之间的主机名验证。

我的期望是客户端向服务器发送请求(从一个节点调用到另一个节点),它接收到包括服务器证书和中间证书(由 CA 签名)的证书链,并且该链在我的信任面前得到验证包含 CA 的商店。

顺便说下这个CA是自己生成的

我错过了什么?

我想我找到了问题。

问题是我的中间证书在它的 AKI 扩展中没有包含密钥标识符值,它应该指向根 CA。它应该是这样的: