Error creating Kafka Topics- Replication factor larger than available brokers

Seems like your server not started , check logs for issue

Kill process

sudo fuser -k 2181/tcp

run zookeeper

bin/zookeeper-server-start.sh config/zookeeper.properties

Run Kafka

bin/kafka-server-start.sh config/server.properties  ' 

If I were you I would try this code:

bin/kafka-topics.sh --create --zookeeper localhost:2181/kafka --replication-factor 1 --partitions 1 --topic test

If you are using a cluster where zookeeper be distributed in 3 nodes you should substitue localhost:2181/kafka for direccion1:2181,direction2:2181,direction3:2181/kafka