当我试图遵循Kafka快速入门-Kafka1.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
#### 生产者错误
但是当我试着把一些信息发布到 `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
恼人的是,这是工作前一天,现在我得到这个生产者的错误,即使没有改变配置。
有人看到这个错误并知道如何修复它吗?
#### 注意:关机总是不干净的
注意:当我关闭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)
暂无答案!
目前还没有任何答案,快来回答吧!