title: UnknownHostException kafka
body: <p>I am trying to setup a Kafka cluster (the first node in the cluster actually).</p>
  
  <p>I have a single node zookeeper cluster setup.  I am setting up kafka on a separate node.</p>
  
  <p>Both running CentOS 6.4, running IPV6 which is a bit of a PITA.  I verified that the machines can talk to each other using netcat.</p>
  
  <p>When I startup kafka, I am getting the following exception (which causes kafka to shut down).
  EDIT: I got kafka starting, I had to set the <code>host.name</code> property in the server.config file.</p>
  
  <p>I was able to create a test topic and send messages just fine from the kafka server.</p>
  
  <p>However, I get the same error when trying to consume the messages.</p>
  
  <p>Any help, suggestions?</p>
  
  <pre><code>bin/kafka-console-consumer.sh --zookeeper zk1:2181 --topic test --from-beginning
  Exception in thread "main" java.net.UnknownHostException: kafka: kafka: Name or service not known
      at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
      at kafka.consumer.ZookeeperConsumerConnector.&lt;init&gt;(ZookeeperConsumerConnector.scala:107)
      at kafka.consumer.ZookeeperConsumerConnector.&lt;init&gt;(ZookeeperConsumerConnector.scala:128)
      at kafka.consumer.Consumer$.create(ConsumerConnector.scala:89)
      at kafka.consumer.ConsoleConsumer$.main(ConsoleConsumer.scala:178)
      at kafka.consumer.ConsoleConsumer.main(ConsoleConsumer.scala)
  Caused by: java.net.UnknownHostException: kafka: Name or service not known
      at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
      at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
      at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
      at java.net.InetAddress.getLocalHost(InetAddress.java:1469)
      ... 5 more
  </code></pre>