你好,我也碰到这个问题了,你是怎么解决的啊~
zookeeper版本是3.4.5-cdh5.5.1,目前这个错误不再报了,主要是对照你的实战笔记做了下修改。但是在启动producer后尝试发送消息时会报错如下,而且consumer那端也接收不到消息。
[root@ws-node01 kafka]# ./producer.sh
aaa
[2017-01-17 14:56:17,058] ERROR Error when sending message to topic xdfjc1 with key: null, value: 3 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for xdfjc1-0 due to 1509 ms has passed since batch creation plus linger time
其中producer.sh
脚本内容如下:
#!/bin/sh
export KAFKA_OPTS="-Djava.security.krb5.conf=/etc/krb5.conf -Djava.security.auth.login.config=/opt/kafka/kafka/config/kafka_client_jaas.conf"
kafka-console-producer.sh --broker-list ws-node01:9092,ws-node02:9092,ws-node03:9092 --topic xdfjc1 --producer.config ./config/producer.properties