我有一个包含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
您缺少以下行
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