English 中文(简体)
Kafka生产商由于NotAvailableError而未能提供信息
原标题:Kafka producers failing to produce message due to LeaderNotAvailableError

我与kafka和zookeeper有一些问题,我有3x kafka经纪人和3x zookeepers。 我把几个卡夫卡问题从我的集装箱中接过来,有些人这样做:

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

查阅卡夫卡的标志似乎并非普通。 动物饲养者有这些标识:

[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)

I m failing to understand the issue. Is zookeeper running out of memory, perhaps? something similar? Any pointers would be appreciated. Thanks

问题回答

I recommend you migrate to the new Kafka versions and use a new KRaft stands for Kafka Raft Metadata mode and replace zookeeper consensus protocol. https://developer.confluent.io/learn/kraft/





相关问题
ZooKeeper alternative for .net

Is there any alternative of ZooKeeper in .net? Other than database which we all use for similar stuff. We need it for leader selection and to make sure one item is getting processed only once and ...

Can I recursively create a path in Zookeeper?

I m pulling ZooKeeper into a project for some concurrency management, and the first thing I tried was something that, to me, was quite obvious (using the zkpython binding): zh = zookeeper.init( ...

Distributed sequence number generation?

I ve generally implemented sequence number generation using database sequences in the past. e.g. Using Postgres SERIAL type http://www.neilconway.org/docs/sequences/ I m curious though as how to ...

zookeeper - locking one-of-many

I have a set of resources each of which has a unique identifier, and each resource element must be locked before it is used, and unlocked afterwards. The logic of the application is: lock any one ...

Zookeeper/Chubby -vs- MySql NDB

I have been reading the Paxos paper, the FLP theorem etc. recently and evaluating Apache Zookeeper for a project. I have also been going thru Chubby (Google s distributed locking service) and the ...

热门标签