执行kafka-consumer-groups.sh失败
Kafka版本是2.3.0
大佬,请教您一个问题,执行这个命令时报了一个错误
./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group graylog2
Error: Executing consumer group command failed due to org.apache.kafka.common.errors.CoordinatorNotAvailableException: The coordinator is not available.
graylog2
消费者组未在集群中运行。你可以使用list查看下列表
bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list
是空的 什么都没有
有两个Topic 用的都是这个组,一个好用,一个能生产但是不能消费
你可以用命令行运行消费者,然后在看看。
是这样,大佬。我的kafka和zookeeper都跑在docker里面,上午的时候还有几个Topic是可以使用的,leader是正常的 zookeeper get/controller 里面的1003, 我现在为了解决问题把docker全部down掉然后重新up所有的topic都不能用了 leader 都为None了 现在的我一头雾水0.0
你这个是集群都不正常了额,你要挨个查看docker的kafka节点是否成功启动了,如果没有报的什么。
## 查询集群描述 bin/kafka-topics.sh --describe --zookeeper
kafka-topics.sh --zookeeper zookeeper:2181 --describe
这个所有Topic的leader都是-1
kafka-topics.sh --bootstrap-server localhost:9092 --describe
这个是所有Topic的leader都是None
难道是kafka没有连接到外部的docker中的zookeeper 然后自动连接到了本地的zookeeper?
这个还是check你的环境吧,你怎么实现的 我不清楚额。
大佬 我又来了,加权限之后就这样,不加的时候 好好的
[root@host-192-168-51-9 kafka_2.12-2.5.1]# bin/kafka-consumer-groups.sh --bootstrap-server 172.19.27.16:9092,172.19.27.46:9092,172.19.27.65:9092 --list Error: Executing consumer group command failed due to org.apache.kafka.common.KafkaException: Failed to find brokers to send ListGroups java.util.concurrent.ExecutionException: org.apache.kafka.common.KafkaException: Failed to find brokers to send ListGroups 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.listGroups(ConsumerGroupCommand.scala:183) at kafka.admin.ConsumerGroupCommand$.main(ConsumerGroupCommand.scala:63) at kafka.admin.ConsumerGroupCommand.main(ConsumerGroupCommand.scala) Caused by: org.apache.kafka.common.KafkaException: Failed to find brokers to send ListGroups at org.apache.kafka.clients.admin.KafkaAdminClient$25.handleFailure(KafkaAdminClient.java:3040) at org.apache.kafka.clients.admin.KafkaAdminClient$Call.failWithTimeout(KafkaAdminClient.java:757) at org.apache.kafka.clients.admin.KafkaAdminClient$Call.fail(KafkaAdminClient.java:728) at org.apache.kafka.clients.admin.KafkaAdminClient$TimeoutProcessor.handleTimeouts(KafkaAdminClient.java:850) at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.timeoutPendingCalls(KafkaAdminClient.java:918) at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.processRequests(KafkaAdminClient.java:1239) at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.run(KafkaAdminClient.java:1203) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.kafka.common.errors.TimeoutException: Call(callName=findAllBrokers, deadlineMs=1615280570994) timed out at 1615280570995 after 1 attempt(s) Caused by: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment.
大佬我重新搭建了一下,遇到这个错了
你的端口已经不是9092了。。。错误原因是timeout。
是 9092 - -你相信我 , 我发消息 监听消息都没问题。。。
[root@host-192-168-51-9 kafka_2.12-2.5.1]# netstat -anp |grep 9092 tcp6 0 0 :::9092 :::* LISTEN 21165/java tcp6 1 0 192.168.51.9:55968 172.19.27.46:9092 CLOSE_WAIT 21165/java tcp6 0 0 192.168.51.9:9092 172.19.27.46:44444 ESTABLISHED 21165/java tcp6 1 0 192.168.51.9:54514 172.19.27.65:9092 CLOSE_WAIT 21165/java tcp6 0 0 192.168.51.9:54488 172.19.27.65:9092 ESTABLISHED 21165/java tcp6 1 0 192.168.51.9:48052 172.19.27.16:9092 CLOSE_WAIT 21165/java tcp6 0 0 192.168.51.9:9092 172.19.27.65:44408 ESTABLISHED 21165/java [root@host-192-168-51-9 kafka_2.12-2.5.1]# ^C [root@host-192-168-51-9 kafka_2.12-2.5.1]# ps -ef | grep 21165 root 19702 18991 0 17:24 pts/0 00:00:00 grep --color=auto 21165 root 21165 21164 2 10:09 ? 00:09:33 /usr/java/jdk1.8.0_181-cloudera/bin/java -Xmx1G -Xms1G -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent -XX:MaxInlineLevel=15 -Djava.awt.headless=true -Xloggc:/opt/kafka/kafka_2.12-2.5.1/bin/../logs/kafkaServer-gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dkafka.logs.dir=/opt/kafka/kafka_2.12-2.5.1/bin/../logs -Dlog4j.configuration=file:/opt/kafka/kafka_2.12-2.5.1/bin/../config/log4j.properties -cp .:/usr/java/jdk1.8.0_181-cloudera/lib/tools.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/activation-1.1.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/aopalliance-repackaged-2.5.0.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/argparse4j-0.7.0.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/audience-annotations-0.5.0.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/commons-cli-1.4.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/commons-lang3-3.8.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/connect-api-2.5.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/connect-basic-auth-extension-2.5.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/connect-file-2.5.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/connect-json-2.5.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/connect-mirror-2.5.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/connect-mirror-client-2.5.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/connect-runtime-2.5.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/connect-transforms-2.5.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/hk2-api-2.5.0.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/hk2-locator-2.5.0.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/hk2-utils-2.5.0.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jackson-annotations-2.10.2.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jackson-core-2.10.2.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jackson-databind-2.10.2.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jackson-dataformat-csv-2.10.2.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jackson-datatype-jdk8-2.10.2.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jackson-jaxrs-base-2.10.2.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jackson-jaxrs-json-provider-2.10.2.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jackson-module-jaxb-annotations-2.10.2.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jackson-module-paranamer-2.10.2.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jackson-module-scala_2.12-2.10.2.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jakarta.activation-api-1.2.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jakarta.annotation-api-1.3.4.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jakarta.inject-2.5.0.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jakarta.ws.rs-api-2.1.5.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jakarta.xml.bind-api-2.3.2.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/javassist-3.22.0-CR2.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/javassist-3.26.0-GA.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/javax.servlet-api-3.1.0.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/javax.ws.rs-api-2.1.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jaxb-api-2.3.0.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jersey-client-2.28.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jersey-common-2.28.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jersey-container-servlet-2.28.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jersey-container-servlet-core-2.28.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jersey-hk2-2.28.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jersey-media-jaxb-2.28.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jersey-server-2.28.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jetty-client-9.4.24.v20191120.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jetty-continuation-9.4.24.v20191120.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jetty-http-9.4.24.v20191120.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jetty-io-9.4.24.v20191120.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jetty-security-9.4.24.v20191120.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jetty-server-9.4.24.v20191120.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jetty-servlet-9.4.24.v20191120.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jetty-servlets-9.4.24.v20191120.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jetty-util-9.4.24.v20191120.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/jopt-simple-5.0.4.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/kafka_2.12-2.5.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/kafka_2.12-2.5.1-sources.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/kafka-clients-2.5.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/kafka-log4j-appender-2.5.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/kafka-streams-2.5.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/kafka-streams-examples-2.5.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/kafka-streams-scala_2.12-2.5.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/kafka-streams-test-utils-2.5.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/kafka-tools-2.5.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/log4j-1.2.17.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/lz4-java-1.7.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/maven-artifact-3.6.3.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/metrics-core-2.2.0.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/netty-buffer-4.1.50.Final.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/netty-codec-4.1.50.Final.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/netty-common-4.1.50.Final.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/netty-handler-4.1.50.Final.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/netty-resolver-4.1.50.Final.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/netty-transport-4.1.50.Final.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/netty-transport-native-epoll-4.1.50.Final.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/netty-transport-native-unix-common-4.1.50.Final.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/osgi-resource-locator-1.0.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/paranamer-2.8.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/plexus-utils-3.2.1.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/reflections-0.9.12.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/rocksdbjni-5.18.3.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/scala-collection-compat_2.12-2.1.3.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/scala-java8-compat_2.12-0.9.0.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/scala-library-2.12.10.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/scala-logging_2.12-3.9.2.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/scala-reflect-2.12.10.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/slf4j-api-1.7.30.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/slf4j-log4j12-1.7.30.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/snappy-java-1.1.7.3.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/validation-api-2.0.1.Final.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/zookeeper-3.5.8.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/zookeeper-jute-3.5.8.jar:/opt/kafka/kafka_2.12-2.5.1/bin/../libs/zstd-jni-1.4.4-7.jar -Djava.security.auth.login.config=/opt/kafka/kafka_2.12-2.5.1/config/kafka-broker-jaas.conf kafka.Kafka /opt/kafka/kafka_2.12-2.5.1/config/server.properties
你新提交个问题吧,不要在别人的问题下提问。
listeners=
看看你的配置。
https://www.orchome.com/10083
来大哥,里面请
你的答案