错误信息太多了,但是重要信息太少。
我姑且认为你是有多台生产机器,其中有部分是报timeout的,有部分是可用的。而且生产机器是网络环境是一致的情况下。
从日志来看,java.nio.channels.ClosedChannelException
这个错误很明显了,就是网络问题。
排查:
1、检查所有生产者机器与集群地址是否是ok的。
2、排查集群的配置是否有问题。
3、防火墙问题,部分防火墙短连接是ok的,但是会kill长连接
不行啊
vim kafka-broker-jaas.conf
KafkaServer {
org.apache.kafka.common.security.scram.ScramLoginModule required
username="admin"
password="admin";
};
[midware@esb1 bin]$ ./kafka-consumer-groups.sh --bootstrap-server node1:9092,node2:9092,node3:9092 --describe --group devGroup --command-config /data/midware/kafka/kafka_2.12-2.2.0/config/kafka-broker-jaas.conf
[2021-06-23 13:56:51,783] WARN The configuration 'KafkaServer' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
[2021-06-23 13:56:51,784] WARN The configuration 'password' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
[2021-06-23 13:56:51,784] WARN The configuration 'org.apache.kafka.common.security.scram.ScramLoginModule' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
[2021-06-23 13:56:51,784] WARN The configuration '};' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
[2021-06-23 13:56:51,784] WARN The configuration 'username' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
Error: Executing consumer group command failed due to org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment.
java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment.
at org.apache.kafka.common.internals.KafkaFutureImpl.wrapAndThrow(KafkaFutureImpl.java:45)
at org.apache.kafka.common.internals.KafkaFutureImpl.access$000(KafkaFutureImpl.java:32)
at org.apache.kafka.common.internals.KafkaFutureImpl$SingleWaiter.await(KafkaFutureImpl.java:89)
at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:260)
at kafka.admin.ConsumerGroupCommand$ConsumerGroupService.collectGroupOffsets(ConsumerGroupCommand.scala:331)
at kafka.admin.ConsumerGroupCommand$ConsumerGroupService.describeGroup(ConsumerGroupCommand.scala:251)
at kafka.admin.ConsumerGroupCommand$.main(ConsumerGroupCommand.scala:59)
at kafka.admin.ConsumerGroupCommand.main(ConsumerGroupCommand.scala)
Caused by: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment.
带上认证文件可以使用
./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group test-group --command-config .xxx.properties