Mac OS X上的制作人错误Kafka Quickstart

时间:2018-02-20 14:45:20

标签: apache-kafka kafka-producer-api

在尝试关注Kafka Quickstart - Kafka 1.0.0

时,我一直遇到恼人的间歇性发布商问题

Zookeeper开始正常 - binding to port 0.0.0.0/0.0.0.0:2181

Kafka经纪人开始正常 - Awaiting socket connections on 0.0.0.0:9092

成功创建主题test

配置。

server.properties

中有趣的配置位
broker.id=0
...
port = 9092
advertised.host.name = localhost
...
zookeeper.connect=localhost:2181

生产者错误

但是当我尝试使用Producer向test发布一些消息时,我收到以下错误。

$ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
>message 1
// then it seems to hang

[2018-02-20 14:34:50,145] ERROR Error when sending message to topic test with key: null, value: 2 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms

令人烦恼的是,这是1天前工作的,现在即使没有更改配置,我也会收到此制作人错误。

有人看过这个错误,知道如何修复它吗?

注意:关机始终是不洁净的

注意:当我关闭Kafka经纪人时,它从来没有这么干净 - 我不确定这是否与我遇到的同样问题有关。

[2018-02-20 14:54:32,774] WARN [KafkaServer id=0] Error during controlled shutdown, possibly because leader movement took longer than the configured controller.socket.timeout.ms and/or request.timeout.ms: Connection to localhost:9092 (id: 0 rack: null) failed. (kafka.server.KafkaServer)
[2018-02-20 14:54:37,783] WARN [KafkaServer id=0] Proceeding to do an unclean shutdown as all the controlled shutdown attempts failed (kafka.server.KafkaServer)
[2018-02-20 14:54:37,785] INFO [SocketServer brokerId=0] Shutting down (kafka.network.SocketServer)

0 个答案:

没有答案