title: Exception in thread "main" java.net.UnknownHostException:
body: <p>i'm new to zookeeper and started to run zookeeper and got this </p>
  
  <pre><code>Exception in thread "main" java.net.UnknownHostException: zoo1
  at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
  at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:848)
  </code></pre>
  
  <p>my zoo.cfg </p>
  
  <pre><code>tickTime=2000
  dataDir=/home/st/storm/datadir/zookeeper
  clientPort=2181
  initLimit=5
  syncLimit=2 
  server.1=zoo1:2888:3888 
  server.2=zoo2:2888:3888 
  server.3=zoo3:2888:3888
  </code></pre>
  
  <p>my /etc/hosts is </p>
  
  <pre><code>127.0.0.1       localhost  
  127.0.1.1   ubuntu
  
  # The following lines are desirable for IPv6 capable hosts
  
  ::1 ip6-localhost ip6-loopback 
  fe00::0 ip6-localnet
  ff00::0 ip6-mcastprefix 
  ff02::1 ip6-allnodes
  ff02::2 ip6-allrouters 
  ff02::3 ip6-allhosts
  </code></pre>