I am trying to create topics in Kafka by following the guide on Apache Kafka website through command line. While running the command:
bin/kafka-topics.sh --c
It clearly says 0 broker is available . Start a broker by
bin/zookeeper-server-start.sh config/zookeeper.properties
bin/kafka-server-start.sh config/server.properties
base on the Apache Kafka tutorial then try
I have had the same problem.I solve the problem.I think the reason for this is because there is no background start-up. so,we neet start-up background
bin/kafka-server-start.sh config/server.properties &
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test &
I have had the same problem. You have to follow this part of the guide: http://kafka.apache.org/documentation.html#quickstart_multibroker
I didn't have any created broker. Create 2 new brokers and you will fix the problem. Follow this steps:
cp config/server.properties config/server-1.properties
cp config/server.properties config/server-2.properties
Once you create that files you have to configure it with this some changes:
In "server-1.properties":
broker.id=1
port=9093
log.dir=/tmp/kafka-logs-1
host.name=localhost
(Port number must be the port number you have in your server.properties + 1. I had 9092 so I have to write 9093)
In "server-2.properties":
broker.id=2
port=9094
log.dir=/tmp/kafka-logs-2
host.name=localhost
(Port number must be the next to server-1. In my case 9094)