apache kafka - ERROR Error when sending message to topic -
while producing message in kafka, getting following error :
$ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic nil_pf1_p1 hi hello [2016-07-19 17:06:34,542] error error when sending message topic nil_pf1_p1 key: null, value: 2 bytes error: (org.apache.kafka.clients.producer.internals.errorloggingcallback) org.apache.kafka.common.errors.timeoutexception: failed update metadata after 60000 ms. [2016-07-19 17:07:34,544] error error when sending message topic nil_pf1_p1 key: null, value: 5 bytes error: (org.apache.kafka.clients.producer.internals.errorloggingcallback) org.apache.kafka.common.errors.timeoutexception: failed update metadata after 60000 ms. $ bin/kafka-topics.sh --describe --zookeeper localhost:2181 --topic nil_pf1_p1 topic:nil_pf1_p1 partitioncount:1 replicationfactor:1 configs: topic: nil_pf1_p1 partition: 0 leader: 2 replicas: 2 isr: 2
any idea on this??
instead of changing server.properties include 0.0.0.0 in code itself. solved problem me.
instead of
/usr/bin/kafka-console-producer --broker-list hostname:9092 --topic myfirsttopic1
use:
/usr/bin/kafka-console-producer --broker-list 0.0.0.0:9092 --topic myfirsttopic1
Comments
Post a Comment