ubuntu - kafka 经纪人在开始时不可用

标签 ubuntu apache-kafka

我在集群的一个 ubuntu 节点上设置了一个 kafka 0.11.0.0 实例。 直到几周前一切正常,今天我试图启动它,但在启动后出现此错误:

[2017-09-11 16:21:13,894] INFO [Kafka Server 0], started (kafka.server.KafkaServer)
[2017-09-11 16:21:18,998] WARN Connection to node 0 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2017-09-11 16:21:21,991] WARN Connection to node 0 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
... and so on...

我的 server.properties:

############################# Server Basics #############################

# The id of the broker. This must be set to a unique integer for each broker.
broker.id=0

# Switch to enable topic deletion or not, default value is false
delete.topic.enable=true

############################# Socket Server Settings ##########################$

# The address the socket server listens on. It will get the value returned from
# java.net.InetAddress.getCanonicalHostName() if not configured.
#   FORMAT:
#     listeners = listener_name://host_name:port
#   EXAMPLE:
#     listeners = PLAINTEXT://your.host.name:9092
#listeners=PLAINTEXT://9092

# Hostname and port the broker will advertise to producers and consumers. If no$
# it uses the value for "listeners" if configured.  Otherwise, it will use the $
# returned from java.net.InetAddress.getCanonicalHostName().
advertised.listeners=PLAINTEXT://hidden_ip:55091

我编辑了 advertised.listeners,因为有一个代理可以将请求重定向到代理。无论如何,直到几周前一切正常......

我启动kafka的步骤:

1- service zookeeper start 
2- ./kafka_2.11-0.11.0.0/bin/kafka-server-start.sh ~/kafka_2.11-0.11.0.0/config/server.properties

有什么建议吗? 谢谢

最佳答案

取消注释这一行

#listeners=PLAINTEXT://:9092

改成

listeners=PLAINTEXT://127.0.0.1:9092

关于ubuntu - kafka 经纪人在开始时不可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46158296/

相关文章:

ubuntu - InfluxDB:无法识别的服务

tomcat - 如何在启动时以非 root 身份启动 Tomcat

java - 如何像使用 avro console producer 一样生成 Kafka avro 记录?

kubernetes - 从 k8s 内的另一个命名空间连接到 kafka

java - 使用不同 Avro 类型向 Kafka 发送消息的性能 – SpecificRecordBase 与带有 Schema Registry 的 GenericRecord

android - 64 位 ubuntu 上的 adb 库依赖性错误

amazon-web-services - 需要密码时如何在 AWS Ubuntu 中运行 systemctl restart apache2

apache-kafka - kafka-topics.sh ---delete --topic '' testTopic'' 不适用于 kafka V 0.10.1

ubuntu - USB没有在ubuntu中显示

apache-kafka - 是否可以使用MirrorMaker2复制没有别名前缀的kafka主题