title: Can not creat consumer with kafka cmd in windows
body: <p>I have an environment problem. 
  I want using zookeeper and Kafka cluster to solve my problem.</p>
  
  <p>My zookeeper version is 3.4.12 and Kafka is 2.12-2.1.0</p>
  
  <p>I also change the zoo.cfg in zookeeper.</p>
  
  <pre><code>dataDir=D:/WEBSOCKET/zookeeper-3.4.12/data
  </code></pre>
  
  <p>and server.properties in kafka.</p>
  
  <pre><code>log.dirs=D:/WEBSOCKET/kafka_2.12-2.1.0/logs
  </code></pre>
  
  <p>I see all the tutorial and do it the exact same way.
  And also usgin kafka open zookeeper.</p>
  
  <p>this is my command:</p>
  
  <p>1) open zookeeper (zkServer.cmd)</p>
  
  <p>2) in kafka </p>
  
  <p>.\bin\windows\kafka-server-start.bat .\config\server.properties</p>
  
  <p>3) create topic</p>
  
  <p>.\bin\windows\kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic hello</p>
  
  <p>4) create a producer</p>
  
  <p>.\bin\windows\kafka-console-producer.bat --bootstrap-server localhost:2181 --topic hello</p>
  
  <p>5) create a consumer</p>
  
  <p>.\bin\windows\kafka-console-consumer.bat --bootstrap-server localhost:2181 --topic hello</p>
  
  <p>when I get in step 5, I always fail.
  zookeeper will give me a lot of console like :</p>
  
  <pre><code> WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@383] - Exception causing close of session 0x0: null
   INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted socket connection from /127.0.0.1:55192
  </code></pre>
  
  <p>and </p>
  
  <pre><code>2019-01-08 17:05:24,822 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1040] - Closed socket connection for client /127.0.0.1:50874 (no session established for client)
  2019-01-08 17:05:25,783 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted socket connection from /127.0.0.1:56089
  </code></pre>
  
  <p>I don't know how to fix it. I google for two days...</p>
  
  <p>when I open my Kafka with step 2, my zookeeper some times doesn't hvae any response or shows me this:</p>
  
  <pre><code> [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@596] - Got user-level KeeperException when processing sessionid:0x1000058f8960000 type:multi cxid:0x36 zxid:0x69 txntype:-1 reqpath:n/a aborting remaining multi ops. Error Path:/admin/preferred_replica_election Error:KeeperErrorCode = NoNode for /admin/preferred_replica_election
  </code></pre>
  
  <p>I also google this, but not helpful.</p>
  
  <p>I set this in kfaka before:
  advertised.host.name = localhost 
  listeners=PLAINTEXT://127.0.0.1:9092</p>
  
  <p>my host have set 
  127.0.0.1       localhost</p>
  
  <p>please help me create local server I want to coding my project..</p>
  
  <p>thank you read all.</p>