The error message shows you don't have a valid leader for the partition you are accessing. In kafka, all read/writes should go through the leader of that partition.
You should make sure the topic/partitions have healthy leader first, run:
kafka-topics --describe --zookeeper <zk_url, put /chroot if you have any> --topic <topic_name>