title: Issues with zookeeper
body: <p>I have certain issues with zookeeper.</p>
  
  <p>1) It is not able to create <code>zookeeper_server.pid</code> in my datadir. I have also tried the suggestion of manually creating the myid in the datadir plus rwx permission is given recursively. But, still getting the following error while stopping the zookeeper:</p>
  
  <pre><code> datadir = dataDir=/usr/local/hadoop/zookeeper/snapshot
  error: could not find file /usr/local/hadoop/zookeeper/snapshot 
  </code></pre>
  
  <p>2) I was trying to manage the zookeeper manually while installing the <code>HBASE</code>. So due to previous issue it was not able to launch even a single instance.  </p>
  
  <pre><code>2013-08-26 12:29:28,908 - INFO  [main:QuorumPeerConfig@310] - Defaulting to majority quorums
  2013-08-26 12:29:28,917 - FATAL [main:QuorumPeerMain@83] - Invalid config, exiting abnormally
  org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing /home/ubuntu/zookeeper/bin/../conf/zoo.cfg
      at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:110)
      at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:99)
      at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:76)
  Caused by: java.lang.IllegalArgumentException: /home/ubuntu/zookeeper/snapshot/myid file is missing
      at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(QuorumPeerConfig.java:320)
      at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:106)
      ... 2 more
  Invalid config, exiting abnormally 
  </code></pre>
  
  <p>3) I also tried the <code>HBASE</code> managed zookeeper. But, in that also even a single instance of zookeeper was not able to launch and was throwing the following error: </p>
  
  <pre><code>zkserver3: java.io.IOException: Could not find my address: slave1 in list of ZooKeeper quorum servers
  zkserver3:  at org.apache.hadoop.hbase.zookeeper.HQuorumPeer.writeMyID(HQuorumPeer.java:140)
  zkserver3:  at org.apache.hadoop.hbase.zookeeper.HQuorumPeer.main(HQuorumPeer.java:61)
  zkserver2: java.io.IOException: Could not find my address: slave in list of ZooKeeper quorum servers
  zkserver2:  at org.apache.hadoop.hbase.zookeeper.HQuorumPeer.writeMyID(HQuorumPeer.java:140)
  zkserver2:  at org.apache.hadoop.hbase.zookeeper.HQuorumPeer.main(HQuorumPeer.java:61)
  starting master, logging to /home/ubuntu/hbase/logs/hbase-ubuntu-master-ip-10-164-98-114.out
  rgserver3: starting regionserver, logging to /home/ubuntu/hbase/bin/../logs/hbase-ubuntu-regionserver-ip-XXXXXXX.out
  rgserver2: starting regionserver, logging to /home/ubuntu/hbase/bin/../logs/hbase-ubuntu-regionserver-ip-XXXXXXX.out
  rgserver1: starting regionserver, logging to /home/ubuntu/hbase/bin/../logs/hbase-ubuntu-regionserver-ip-XXXXXX.out
  </code></pre>
  
  <p><strong>Updated logs for issue 1</strong></p>
  
  <pre><code>JMX enabled by default
  Using config: /usr/local/hadoop/zookeeper/bin/../conf/zoo.cfg
  Starting zookeeper ... 
  /usr/local/hadoop/zookeeper/bin/zkServer.sh: 80: /usr/local/hadoop/zookeeper/bin/zkServer.sh: cannot create /usr/local/hadoop/zookeeper/snapshot
  # The number of snapshots to retain in dataDir/zookeeper_server.pid: Directory nonexistent
  STARTED
  hduser@naresh-pc:/usr/local/hadoop/zookeeper/conf$ 2013-08-27 12:06:16,688 - INFO  [main:QuorumPeerConfig@90] - Reading configuration from: /usr/local/hadoop/zookeeper/bin/../conf/zoo.cfg
  2013-08-27 12:06:16,692 - WARN  [main:QuorumPeerMain@105] - Either no config or no quorum defined in config, running  in standalone mode
  2013-08-27 12:06:16,764 - INFO  [main:QuorumPeerConfig@90] - Reading configuration from: /usr/local/hadoop/zookeeper/bin/../conf/zoo.cfg
  2013-08-27 12:06:16,765 - INFO  [main:ZooKeeperServerMain@94] - Starting server
  2013-08-27 12:06:16,780 - INFO  [main:Environment@97] - Server environment:zookeeper.version=3.3.3-1073969, built on 02/23/2011 22:27 GMT
  2013-08-27 12:06:16,780 - INFO  [main:Environment@97] - Server environment:host.name=naresh-pc
  2013-08-27 12:06:16,781 - INFO  [main:Environment@97] - Server environment:java.version=1.6.0_27
  2013-08-27 12:06:16,781 - INFO  [main:Environment@97] - Server environment:java.vendor=Sun Microsystems Inc.
  2013-08-27 12:06:16,781 - INFO  [main:Environment@97] - Server environment:java.home=/usr/lib/jvm/java-6-openjdk-i386/jre
  2013-08-27 12:06:16,782 - INFO  [main:Environment@97] - Server environment:java.class.path=/usr/local/hadoop/zookeeper/bin/../build/classes:/usr/local/hadoop/zookeeper/bin/../build/lib/*.jar:/usr/local/hadoop/zookeeper/bin/../zookeeper-3.3.3.jar:/usr/local/hadoop/zookeeper/bin/../lib/log4j-1.2.15.jar:/usr/local/hadoop/zookeeper/bin/../lib/jline-0.9.94.jar:/usr/local/hadoop/zookeeper/bin/../src/java/lib/ivy-2.1.0.jar:/usr/local/hadoop/zookeeper/bin/../conf::/usr/local/hadoop/hive/lib:/usr/local/hadoop/lib:/usr/local/hadoop/hive/lib/hive-contrib-0.9.0.jar:/usr/local/hadoop/storm/lib/jzmq-2.1.0.jar:/usr/local/hadoop/storm/lib/ring-servlet-0.3.11.jar:/usr/local/hadoop/storm/lib/compojure-0.6.4.jar:/usr/local/hadoop/storm/lib/commons-logging-1.1.1.jar:/usr/local/hadoop/storm/lib/curator-framework-1.0.1.jar:/usr/local/hadoop/storm/lib/curator-client-1.0.1.jar:/usr/local/hadoop/storm/lib/ring-jetty-adapter-0.3.11.jar:/usr/local/hadoop/storm/lib/carbonite-1.5.0.jar:/usr/local/hadoop/storm/lib/hiccup-0.3.6.jar:/usr/local/hadoop/storm/lib/servlet-api-2.5.jar:/usr/local/hadoop/storm/lib/commons-codec-1.4.jar:/usr/local/hadoop/storm/lib/disruptor-2.10.1.jar:/usr/local/hadoop/storm/lib/asm-4.0.jar:/usr/local/hadoop/storm/lib/objenesis-1.2.jar:/usr/local/hadoop/storm/lib/junit-3.8.1.jar:/usr/local/hadoop/storm/lib/clout-0.4.1.jar:/usr/local/hadoop/storm/lib/json-simple-1.1.jar:/usr/local/hadoop/storm/lib/libthrift7-0.7.0.jar:/usr/local/hadoop/storm/lib/minlog-1.2.jar:/usr/local/hadoop/storm/lib/jetty-6.1.26.jar:/usr/local/hadoop/storm/lib/tools.logging-0.2.3.jar:/usr/local/hadoop/storm/lib/tools.cli-0.2.2.jar:/usr/local/hadoop/storm/lib/joda-time-2.0.jar:/usr/local/hadoop/storm/lib/slf4j-api-1.5.8.jar:/usr/local/hadoop/storm/lib/tools.macro-0.1.0.jar:/usr/local/hadoop/storm/lib/log4j-1.2.16.jar:/usr/local/hadoop/storm/lib/clj-time-0.4.1.jar:/usr/local/hadoop/storm/lib/snakeyaml-1.9.jar:/usr/local/hadoop/storm/lib/commons-exec-1.1.jar:/usr/local/hadoop/storm/lib/commons-lang-2.5.jar:/usr/local/hadoop/storm/lib/httpcore-4.1.jar:/usr/local/hadoop/storm/lib/commons-io-1.4.jar:/usr/local/hadoop/storm/lib/httpclient-4.1.1.jar:/usr/local/hadoop/storm/lib/commons-fileupload-1.2.1.jar:/usr/local/hadoop/storm/lib/jetty-util-6.1.26.jar:/usr/local/hadoop/storm/lib/servlet-api-2.5-20081211.jar:/usr/local/hadoop/storm/lib/reflectasm-1.07-shaded.jar:/usr/local/hadoop/storm/lib/zookeeper-3.3.3.jar:/usr/local/hadoop/storm/lib/math.numeric-tower-0.0.1.jar:/usr/local/hadoop/storm/lib/jgrapht-0.8.3.jar:/usr/local/hadoop/storm/lib/kryo-2.17.jar:/usr/local/hadoop/storm/lib/jline-0.9.94.jar:/usr/local/hadoop/storm/lib/clojure-1.4.0.jar:/usr/local/hadoop/storm/lib/ring-core-0.3.10.jar:/usr/local/hadoop/storm/lib/guava-13.0.jar:/usr/local/hadoop/storm/lib/core.incubator-0.1.0.jar:/usr/local/hadoop/storm/lib/slf4j-log4j12-1.5.8.jar:/usr/local/hadoop/storm/storm-0.8.1.jar:/usr/local/hadoop/storm/conf/storm.yaml
  2013-08-27 12:06:16,782 - INFO  [main:Environment@97] - Server environment:java.library.path=/usr/lib/jvm/java-6-openjdk-i386/jre/lib/i386/client:/usr/lib/jvm/java-6-openjdk-i386/jre/lib/i386:/usr/lib/jvm/java-6-openjdk-i386/jre/../lib/i386:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/client:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386:/usr/java/packages/lib/i386:/usr/lib/i386-linux-gnu/jni:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/lib/jni:/lib:/usr/lib
  2013-08-27 12:06:16,782 - INFO  [main:Environment@97] - Server environment:java.io.tmpdir=/tmp
  2013-08-27 12:06:16,782 - INFO  [main:Environment@97] - Server environment:java.compiler=&lt;NA&gt;
  2013-08-27 12:06:16,782 - INFO  [main:Environment@97] - Server environment:os.name=Linux
  2013-08-27 12:06:16,783 - INFO  [main:Environment@97] - Server environment:os.arch=i386
  2013-08-27 12:06:16,783 - INFO  [main:Environment@97] - Server environment:os.version=3.2.0-49-generic-pae
  2013-08-27 12:06:16,783 - INFO  [main:Environment@97] - Server environment:user.name=hduser
  2013-08-27 12:06:16,783 - INFO  [main:Environment@97] - Server environment:user.home=/home/hduser
  2013-08-27 12:06:16,783 - INFO  [main:Environment@97] - Server environment:user.dir=/usr/local/hadoop/zookeeper/conf
  2013-08-27 12:06:16,829 - INFO  [main:ZooKeeperServer@663] - tickTime set to 2000
  2013-08-27 12:06:16,830 - INFO  [main:ZooKeeperServer@672] - minSessionTimeout set to -1
  2013-08-27 12:06:16,830 - INFO  [main:ZooKeeperServer@681] - maxSessionTimeout set to -1
  2013-08-27 12:06:16,911 - INFO  [main:NIOServerCnxn$Factory@143] - binding to port 0.0.0.0/0.0.0.0:2181
  2013-08-27 12:06:17,013 - INFO  [main:FileSnap@82] - Reading snapshot /usr/local/hadoop/zookeeper/snapshot/version-2/snapshot.10e27
  2013-08-27 12:06:17,139 - INFO  [main:FileTxnSnapLog@208] - Snapshotting: 10e27
  </code></pre>
  
  <p><strong>while stopping</strong></p>
  
  <pre><code>JMX enabled by default
  Using config: /usr/local/hadoop/zookeeper/bin/../conf/zoo.cfg
  Stopping zookeeper ... 
  error: could not find file /usr/local/hadoop/zookeeper/snapshot
  # The number of snapshots to retain in dataDir/zookeeper_server.pid
  </code></pre>