title: Why can't I create a topic in Kafka?
body: <p>Following the <a href="https://kafka.apache.org/documentation/" rel="nofollow noreferrer">Apache Kafka Quickstart Guide</a>, I've done the following steps:</p>
  
  <ul>
  <li>Download and untar <code>kafka_2.11-2.1.0.tgz</code></li>
  <li><code>cd kafka_2.11-2.1.0</code></li>
  <li><code>bin/zookeeper-server-start.sh config/zookeeper.properties</code></li>
  <li>In another terminal the the same dir, <code>bin/kafka-server-start.sh config/server.properties</code></li>
  <li><code>bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test</code>. Running <code>echo $?</code> afterward shows that this command exited with status <code>0</code></li>
  </ul>
  
  <p>Now the moment of truth. The guide says:</p>
  
  <blockquote>
    <p>We can now see that topic if we run the list topic command:</p>
  </blockquote>
  
  <pre><code>bin/kafka-topics.sh --list --zookeeper localhost:2181
  &gt; test
  </code></pre>
  
  <p>However, I get no output from that command, and a piece of software I'm testing, which tries to send a message on the <code>"test"</code> topic, crashes because it finds 0 partitions for the topic.</p>
  
  <p>I also have a Ruby program that sends messages to Kafka on topic <code>"test"</code>. It fails and retries, and I see the topic created at that point in the Kafka logs and can send messages to it. But even then, the command to list topics returns nothing.</p>
  
  <p>Why can't I create a topic explicitly? Why can't I list topics that were created on demand? How can I troubleshoot this?</p>
  
  <hr>
  
  <h2>Logs</h2>
  
  <p>Here's what I see in the logs: <a href="https://gist.github.com/nathanl/bea7a45a056b2d44146947ec88c29185" rel="nofollow noreferrer">https://gist.github.com/nathanl/bea7a45a056b2d44146947ec88c29185</a></p>