生产、消费都可以,查offset不行。
$ export KAFKA_OPTS="-Djava.security.krb5.conf=/etc/krb5.conf -Djava.security.auth.login.config=/home/kafka/config/jaas.conf"
$ /home/kafka/bin/kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list myc4:6667 --topic acsp1 --time -1
[2021-09-24 14:59:40,877] WARN Fetching topic metadata with correlation id 0 for topics [Set(acsp1)] from broker [BrokerEndPoint(0,myc4,6667)] failed (kafka.client.ClientUtils$)
java.io.EOFException
at org.apache.kafka.common.network.NetworkReceive.readFromReadableChannel(NetworkReceive.java:83)
at kafka.network.BlockingChannel.readCompletely(BlockingChannel.scala:129)
at kafka.network.BlockingChannel.receive(BlockingChannel.scala:120)
at kafka.producer.SyncProducer.liftedTree1$1(SyncProducer.scala:82)
at kafka.producer.SyncProducer.kafka$producer$SyncProducer$$doSend(SyncProducer.scala:79)
at kafka.producer.SyncProducer.send(SyncProducer.scala:124)
at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:59)
at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:94)
at kafka.tools.GetOffsetShell$.main(GetOffsetShell.scala:79)
at kafka.tools.GetOffsetShell.main(GetOffsetShell.scala)
Exception in thread "main" kafka.common.KafkaException: fetching topic metadata for topics [Set(acsp1)] from broker [ArrayBuffer(BrokerEndPoint(0,myc4,6667))] failed
at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:73)
at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:94)
at kafka.tools.GetOffsetShell$.main(GetOffsetShell.scala:79)
at kafka.tools.GetOffsetShell.main(GetOffsetShell.scala)
Caused by: java.io.EOFException
at org.apache.kafka.common.network.NetworkReceive.readFromReadableChannel(NetworkReceive.java:83)
at kafka.network.BlockingChannel.readCompletely(BlockingChannel.scala:129)
at kafka.network.BlockingChannel.receive(BlockingChannel.scala:120)
at kafka.producer.SyncProducer.liftedTree1$1(SyncProducer.scala:82)
at kafka.producer.SyncProducer.kafka$producer$SyncProducer$$doSend(SyncProducer.scala:79)
at kafka.producer.SyncProducer.send(SyncProducer.scala:124)
at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:59)
... 3 more
这样:
export KAFKA_OPTS="-Djava.security.krb5.conf=/etc/krb5.conf -Djava.security.auth.login.config=/etc/kafka/kafka_client_jaas.conf"
/home/kafka/bin/kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list myc1:6667 --topic acsp1 --time -1
多谢了,也是因为客户用的这个版本,为了保持一致才降到这个版本的。
nmap扫描的时候基本都在半夜(那时候资源占用应该很低),而且是几秒钟内发起了16次异常连接,不行升版本了,哈哈。
一般是kakfa节点内部的资源利用率很高导致的夯住了,或者某些资源一直拿不到在等待(死锁),可以系统监控cpu和内存的使用情况可以观察下,排除系统资源的问题。
另外,你说的对,大概率是kafka入口bug导致的,(猜测)同一时刻执行某些命令的时候,并行导致资源争抢死锁。
我没有更好的办法(0.10.1.0版本太旧了,也没维护了),全球都没找到相关的问题...