zookeeper 中的 NIOServerCnxn 不支持获取 SSL

问题描述 投票:0回答:1

我有一个包含3个zookeeper实例的集群大约一年了(zookeeper版本是3.5.8)。动物园管理员一直工作到昨天,突然失败,并且不再启动。在所有 3 个实例中。

启动zookeeper时引发的异常是:

java.lang.UnsupportedOperationException: SSL isn't supported in NIOServerCnxn
  at org.apache.zookeeper.server.NIOServerCnxnFactory.configure(NIOServerCnxnFactory.java:644)
  at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:155)
  at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:123)
  at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:82)

这是所有 3 个实例中的 Zookeeper 配置:

clientPrt=2181
syncLimit=2
autopurge.purgeInterval=1
maxClientCnxns=10
initLimit=5
dataDir=/var/lib/zookeeper/
tickTime=2000
autopurge.snapRetainCount=10

secureClientPort=2281

server.1=X.X.X.X:2888:3888;2181
server.2=X.X.X.X:2888:3888;2181
server.3=X.X.X.X:2888:3888;2181
java ssl apache-zookeeper
1个回答
0
投票

您缺少以下行

serverCnxnFactory=org.apache.zookeeper.server.NettyServerCnxnFactory

在你的zoo.conf中

clientPrt=2181
syncLimit=2
autopurge.purgeInterval=1
maxClientCnxns=10
initLimit=5
dataDir=/var/lib/zookeeper/
tickTime=2000
autopurge.snapRetainCount=10
serverCnxnFactory=org.apache.zookeeper.server.NettyServerCnxnFactory

secureClientPort=2281

server.1=X.X.X.X:2888:3888;2181
server.2=X.X.X.X:2888:3888;2181
server.3=X.X.X.X:2888:3888;2181
© www.soinside.com 2019 - 2024. All rights reserved.