我们有 3 个节点的 kafka 集群,每个 kafka 都包含 zookeeper 服务器和架构注册表
我们在其中一个 zookeeper 服务器上收到以下错误
[2019-11-12 07:44:20,719] ERROR Unable to load database on disk (org.apache.zookeeper.server.quorum.QuorumPeer)
java.io.IOException: Unreasonable length = 198238896
at org.apache.jute.BinaryInputArchive.checkLength(BinaryInputArchive.java:127)
at org.apache.jute.BinaryInputArchive.readBuffer(BinaryInputArchive.java:92)
at org.apache.zookeeper.server.persistence.Util.readTxnBytes(Util.java:233)
at org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next(FileTxnLog.java:629)
at org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:166)
at org.apache.zookeeper.server.ZKDatabase.loadDataBase(ZKDatabase.java:223)
at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:601)
at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:591)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:164)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:111)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
文件夹下的一些快照文件似乎/opt/confluent/zookeeper/data/version-2
已损坏
在文件夹下version-2
,我们有以下示例文件
many files as log.3000667b5
many files as snapshot.200014247
one file - acceptedEpoch
one file – currentEpoch
所以问题是——如何启动 zookeeper 服务器
据我所知,我们有两个选择,但我不确定
1)一种选择是将version-2
文件夹移动到其他位置version-2_backup
并创建新文件夹 -version-2
然后/opt/confluent/zookeeper/data
启动zookeeper服务器并希望快照从其他良好的活动zookeeper服务器复制?
2)第二个选项可能是将version-2
文件夹移动到其他位置version-2_backup
,创建新文件夹 -version-2
并将所有内容从version-2
好机器复制到坏的 zookeeper 服务器version-2
,但我不确定这是否是正确的选择?