使用Kafka命令行工具来获取给定组/主题的消费者时滞,我遇到了问题。目前,我正在尝试使用kafka-consumer-groups.sh
,如无数的在线资源中所述。以下命令可以正常工作:kafka-consumer-groups.sh --bootstrap-server $BROKERS --list
但是,如果我使用kafka-consumer-groups.sh --bootstrap-server $BROKERS --describe --group $GROUP
,则会得到以下输出和错误:
Note: This will only show information about consumers that use the Java consumer API (non-ZooKeeper-based consumers).
[2018-07-24 00:19:09,139] ERROR admin-client-network-thread exited (kafka.admin.AdminClient) java.lang.NullPointerException
at org.apache.kafka.common.utils.Utils.join(Utils.java:399)
at org.apache.kafka.common.requests.OffsetFetchRequest$Builder.toString(OffsetFetchRequest.java:74)
at java.lang.String.valueOf(String.java:2994)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at org.apache.kafka.clients.ClientRequest.toString(ClientRequest.java:63)
at org.apache.kafka.clients.NetworkClient.doSend(NetworkClient.java:374)
at org.apache.kafka.clients.NetworkClient.send(NetworkClient.java:332)
at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.trySend(ConsumerNetworkClient.java:409)
at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:252)
at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:208)
at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:199)
at kafka.admin.AdminClient$$anon$1.run(AdminClient.scala:61)
at java.lang.Thread.run(Thread.java:748) Error: Executing consumer group command failed due to The server experienced an unexpected error when processing the request
我尝试为每个可用组设置GROUP
,并使用KafkaTool确认这些组是否存在并正常工作(使用来自各个主题的消息)。我尝试直接在命令中放置字符串,而不是使用环境变量。
为什么会出现此错误,我还能做什么调试?