kafka Create topic 报错

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了kafka Create topic 报错相关的知识,希望对你有一定的参考价值。

bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic kk_log
报错如下:
WARN [Consumer clientId=consumer-1, groupId=console-consumer-507] Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)

配置server.confg时候设置的
advertised.listeners=PLAINTEXT://10.171.222.26:9092
此时需要用配置的IP而非localhost地址:

nohup bin/zookeeper-server-start.sh config/zookeeper.properties > /dev/null 2>&1 &
nohup bin/kafka-server-start.sh config/server.properties > /dev/null 2>&1 &
netstat -ntpl|egrep "(2181|9092)"
运行起来再试试
bin/kafka-console-consumer.sh --bootstrap-server 10.171.222.26:9092 --topic kk_log
应该就可以了。
做个小笔记。

以上是关于kafka Create topic 报错的主要内容,如果未能解决你的问题,请参考以下文章

kafka删除topic后再创建同名的topic报错(ERROR org.apache.kafka.common.errors.TopicExistsException)

记录一下Kafka报错:timeout expired while fetching topic metadata

查看Kafka集群下所有的topic报错“Timed out waiting for a node assignment. Call: listTopics“

简单的centos7访问server12r2共享竟然报错报错报错~~~~~~~

kafkaFlink 消费 kafka Received unknown topic topic/partition may not exist Describe access to it

kafka.common.errors.TimeoutException:Timeout expired while fetching topic metadata