Zookeeper Kafka生产者由于LeaderNotableError而无法生成消息

swvgeqrz  于 12个月前  发布在  Apache
关注(0)|答案(1)|浏览(150)

我有一些问题与Kafka和zookeeper,我有3x Kafka经纪人和3x zookeepers.我得到了几个Kafka问题从我的容器,有些有这样的:

time="2023-12-26T09:46:00Z" level=error msg="Failed to produce message {low_priority[-1]@0 [123 34 99 111 109 112 111 ......] 0001-01-01 00:00:00 +0000 UTC NotAvailable <nil> []} with producer &{rdkafka#producer-1 x}"

字符串
其他人有这样的:

future: <Future finished exception=LeaderNotAvailableError()>
kafka.errors.LeaderNotAvailableError: [Error 5] LeaderNotAvailableError


查看Kafka日志,似乎没有什么不寻常的。Zookeeper有这些日志:

[2023-12-25 13:23:14,197] WARN Close of session 0x0 (org.apache.zookeeper.server.NIOServerCnxn)
java.io.IOException: ZooKeeperServer not running
    at org.apache.zookeeper.server.NIOServerCnxn.readLength(NIOServerCnxn.java:544)
    at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:332)
    at org.apache.zookeeper.server.NIOServerCnxnFactory$IOWorkRequest.doWork(NIOServerCnxnFactory.java:522)
    at org.apache.zookeeper.server.WorkerService$ScheduledWorkRequest.run(WorkerService.java:154)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)


我不明白这个问题。也许是zookeeper内存不足?类似的问题?任何提示都将不胜感激。谢谢

rvpgvaaj

rvpgvaaj1#

我建议您迁移到新的Kafka版本,并使用新的KRaft代表Kafka Raft元数据模式,并替换zookeeper共识协议。https://developer.confluent.io/learn/kraft/

相关问题