title: Hbase Master is failing in a cluster set up. (Hadoop, Hbase, and Zookeeper)
body: <p>I am running a single node cluster with hadoop, hbase and zookeeper. Hmaster is failing to construct with following error. Can anyone help me?</p>
  
  <p>**</p>
  
  <pre><code>2016-06-02 14:51:56,770 INFO  [master/localhost/127.0.0.1:60000] zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=90000 watcher=hconnection-0x290556860x0, quorum=localhost:2181, baseZNode=/hbase
  2016-06-02 14:51:56,776 INFO  [master/localhost/127.0.0.1:60000-SendThread(localhost:2181)] zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
  2016-06-02 14:51:56,781 INFO  [master/localhost/127.0.0.1:60000-SendThread(localhost:2181)] zookeeper.ClientCnxn: Socket connection established to localhost/127.0.0.1:2181, initiating session
  2016-06-02 14:51:56,804 INFO  [master/localhost/127.0.0.1:60000-SendThread(localhost:2181)] zookeeper.ClientCnxn: Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x155106b3fcb0002, negotiated timeout = 40000
  2016-06-02 14:51:56,815 INFO  [master/localhost/127.0.0.1:60000] client.ZooKeeperRegistry: ClusterId read in ZooKeeper is null
  2016-06-02 14:51:56,905 FATAL [localhost:60000.activeMasterManager] master.HMaster: Failed to become active master
  java.lang.IllegalStateException
      at com.google.common.base.Preconditions.checkState(Preconditions.java:133)
      at org.apache.hadoop.ipc.Client.setCallIdAndRetryCount(Client.java:118)
      at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:99)
      at com.sun.proxy.$Proxy17.setSafeMode(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.hadoop.hbase.fs.HFileSystem$1.invoke(HFileSystem.java:279)
      at com.sun.proxy.$Proxy18.setSafeMode(Unknown Source)
      at org.apache.hadoop.hdfs.DFSClient.setSafeMode(DFSClient.java:2419)
      at org.apache.hadoop.hdfs.DistributedFileSystem.setSafeMode(DistributedFileSystem.java:1036)
      at org.apache.hadoop.hdfs.DistributedFileSystem.setSafeMode(DistributedFileSystem.java:1020)
      at org.apache.hadoop.hbase.util.FSUtils.isInSafeMode(FSUtils.java:525)
      at org.apache.hadoop.hbase.util.FSUtils.waitOnSafeMode(FSUtils.java:971)
      at org.apache.hadoop.hbase.master.MasterFileSystem.checkRootDir(MasterFileSystem.java:424)
      at org.apache.hadoop.hbase.master.MasterFileSystem.createInitialFileSystemLayout(MasterFileSystem.java:153)
      at org.apache.hadoop.hbase.master.MasterFileSystem.&lt;init&gt;(MasterFileSystem.java:128)
      at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:638)
      at org.apache.hadoop.hbase.master.HMaster.access$500(HMaster.java:184)
      at org.apache.hadoop.hbase.master.HMaster$1.run(HMaster.java:1729)
      at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>**</p>
  
  <p>In addition I am getting an INFO log in zookeeper which shows and error.</p>
  
  <pre><code>2016-06-02 14:52:00,080 [myid:] - INFO  [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@651] - Got user-level KeeperException when processing sessionid:0x155106b3fcb0000 type:delete cxid:0x1f zxid:0x13 txntype:-1 reqpath:n/a Error Path:/hbase/rs/localhost,60000,1464859314301 Error:KeeperErrorCode = NoNode for /hbase/rs/localhost,60000,1464859314301
  </code></pre>
  
  <p>Can anyone point me what is the actual problem?</p>
  
  <p>hbase-site.xml</p>
  
  <pre><code>&lt;configuration&gt;
  &lt;property&gt;
    &lt;name&gt;hbase.cluster.distributed&lt;/name&gt;
    &lt;value&gt;true&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
    &lt;name&gt;hbase.rootdir&lt;/name&gt;
    &lt;value&gt;hdfs://localhost:9000/hbase&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
    &lt;name&gt;hbase.regionserver.wal.codec&lt;/name&gt;
    &lt;value&gt;org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec&lt;/value&gt;
  &lt;/property&gt;
  &lt;!--&lt;property&gt;
    &lt;name&gt;hbase.master.loadbalancer.class&lt;/name&gt;
    &lt;value&gt;org.apache.phoenix.hbase.index.balancer.IndexLoadBalancer&lt;/value&gt;
  &lt;/property&gt;--&gt;
  &lt;!--&lt;property&gt;
    &lt;name&gt;hbase.coprocessor.master.classes&lt;/name&gt;
    &lt;value&gt;org.apache.phoenix.hbase.index.master.IndexMasterObserver&lt;/value&gt;
  &lt;/property&gt;--&gt;
  &lt;property&gt;
    &lt;name&gt;hbase.master.port&lt;/name&gt;
    &lt;value&gt;60000&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
    &lt;name&gt;phoenix.functions.allowUserDefinedFunctions&lt;/name&gt;
    &lt;value&gt;true&lt;/value&gt;
  &lt;/property&gt;
  
  &lt;property&gt;
    &lt;name&gt;hbase.master.info.port&lt;/name&gt;
    &lt;value&gt;60010&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
    &lt;name&gt;hbase.dynamic.jars.dir&lt;/name&gt;
    &lt;value&gt;hdfs://localhost:9000/hbase/tmpjars/&lt;/value&gt;
  &lt;/property&gt;
  &lt;!--&lt;property&gt;
    &lt;name&gt;hbase.coprocessor.region.classes&lt;/name&gt;
    &lt;value&gt;org.apache.hadoop.hbase.coprocessor.MyCoprocessor&lt;/value&gt;
  &lt;/property&gt;--&gt;
  &lt;property&gt;
    &lt;name&gt;hbase.regionserver.executor.openregion.threads&lt;/name&gt;
    &lt;value&gt;100&lt;/value&gt;
  &lt;/property&gt;
  &lt;!--&lt;property&gt;
    &lt;name&gt;phoenix.groupby.maxCacheSize&lt;/name&gt;
    &lt;value&gt;2096&lt;/value&gt;
  &lt;/property&gt;--&gt;
  &lt;!--&lt;property&gt;
    &lt;name&gt;phoenix.trace.frequency&lt;/name&gt;
    &lt;value&gt;never&lt;/value&gt;
  &lt;/property&gt;--&gt;
  &lt;property&gt;
    &lt;name&gt;phoenix.query.spoolThresholdBytes&lt;/name&gt;
    &lt;value&gt;31457280&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
    &lt;name&gt;hbase.region.server.rpc.scheduler.factory.class&lt;/name&gt;
    &lt;value&gt;org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory&lt;/value&gt;
    &lt;description&gt;Factory to create the Phoenix RPC Scheduler that uses separate queues for index and metadata updates&lt;/description&gt;
  &lt;/property&gt;
  &lt;property&gt;
    &lt;name&gt;hbase.rpc.controllerfactory.class&lt;/name&gt;
    &lt;value&gt;org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory&lt;/value&gt;
    &lt;description&gt;Factory to create the Phoenix RPC Scheduler that uses separate queues for index and metadata updates&lt;/description&gt;
  &lt;/property&gt;
  &lt;!--&lt;property&gt;
    &lt;name&gt;phoenix.trace.statsTableName&lt;/name&gt;
    &lt;value&gt;SYSTEM.TRACING_STATS&lt;/value&gt;
  &lt;/property&gt;--&gt;
  &lt;property&gt;
    &lt;name&gt;phoenix.table.use.stats.timestamp&lt;/name&gt;
    &lt;value&gt;false&lt;/value&gt;
  &lt;/property&gt;
  &lt;!--&lt;property&gt;
    &lt;name&gt;phoenix.stats.guidepost.width&lt;/name&gt;
    &lt;value&gt;20&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
    &lt;name&gt;phoenix.stats.guidepost.width&lt;/name&gt;
    &lt;value&gt;true&lt;/value&gt;
  &lt;/property&gt;--&gt;
  &lt;!--&lt;property&gt;
    &lt;name&gt;fs.hdfs.impl&lt;/name&gt;
    &lt;value&gt;org.apache.hadoop.hdfs.DistributedFileSystem&lt;/value&gt;
  &lt;/property&gt;--&gt;
  &lt;property&gt;
    &lt;name&gt;hbase.coprocessor.regionserver.classes&lt;/name&gt;
    &lt;value&gt;org.apache.hadoop.hbase.regionserver.LocalIndexMerger&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
  &lt;name&gt;hbase.rpc.timeout&lt;/name&gt;
  &lt;value&gt;300000&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
  &lt;name&gt;hbase.client.scanner.timeout.period&lt;/name&gt;
  &lt;value&gt;300000&lt;/value&gt;
  &lt;/property&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Please help me in this issue?</p>