Create a Kafka streaming from sample.csv file

1,063 views
Skip to first unread message

akshay naidu

unread,
Dec 29, 2016, 10:27:47 AM12/29/16
to kafka-clients
Hello,
I am new to Kafka. I installed it today on my Ubuntu. 
I want to create a kafka streaming from a sample.csv file .

I tried this command --> sudo /opt/Kafka/kafka_2.10-0.10.0.1/bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test0 < /home/akshay/Downloads/taas_121116.csv
and got this error      -->
[2016-12-29 20:32:32,526] ERROR Error when sending message to topic test0 with key: null, value: 62 bytes with error:(org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.
[2016-12-29 20:33:32,608] ERROR Error when sending message to topic test0 with key: null, value: 59 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.
         I had to stop it with Ctrl+c key.

I followed this link for installation, while following a step for testing with the command 
--> 
sudo /opt/Kafka/kafka_2.10-0.10.0.1/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1  --partitions 1 --topic testing
this error occured -->
Error while executing topic command : replication factor: 1 larger than available brokers: 0
[2016-12-29 20:45:41,582] ERROR kafka.admin.AdminOperationException: replication factor: 1 larger than available brokers: 0
at kafka.admin.AdminUtils$.assignReplicasToBrokers(AdminUtils.scala:117)
at kafka.admin.AdminUtils$.createTopic(AdminUtils.scala:403)
at kafka.admin.TopicCommand$.createTopic(TopicCommand.scala:110)
at kafka.admin.TopicCommand$.main(TopicCommand.scala:61)
at kafka.admin.TopicCommand.main(TopicCommand.scala)
 (kafka.admin.TopicCommand$)

Please assist me. 
Thank You.


Reply all
Reply to author
Forward
0 new messages