2

I am trying to setup hbase on my local MAC machine. I installed hadoop and hbase via brew. The version for hadoop and hbase are 2.7.1 and 1.1.2 respectively. I am trying to run in Pseudo distributed mode and want to disable the authentication so have made the following changes in below files. I am using hbase zookeeper.

Below are changes to enable SIMPLE authentication

/etc/hadoop/core-site.xml

    <property>
      <name>hadoop.security.authentication</name>
      <value>simple</value> <!-- A value of "simple" would disable security. -->
    </property>

    <property>
      <name>hadoop.security.authorization</name>
      <value>false</value>
    </property>

also made changes the following changes in libexec/conf/hbase-site.xml

   <property>
      <name>hbase.rootdir</name>
      <value>hdfs://localhost:8030/hbase</value>
   </property>
    <property>
         <name>hbase.security.authentication</name>
         <value>simple</value>
      </property>
    <property>
      <name>hbase.security.authorization</name>
      <value>false</value>
    </property>

I have not made any changes in hbase-policy.xml. The default configuration is as below.

<configuration>
  <property>
    <name>security.client.protocol.acl</name>
    <value>*</value>
  </property>

  <property>
    <name>security.admin.protocol.acl</name>
    <value>*</value>
  </property>

  <property>
    <name>security.masterregion.protocol.acl</name>
    <value>*</value>
  </property>
</configuration>

When I start the hadoop and then hbase, I see the following error in hbase master-local.log

2016-03-13 13:07:36,533 INFO  [master//10.0.0.164:16000-SendThread(localhost:2181)] zookeeper.ClientCnxn: Session establishment complete on server localhost/127
.0.0.1:2181, sessionid = 0x15371605a990001, negotiated timeout = 90000
2016-03-13 13:07:36,575 FATAL [10.0.0.164:16000.activeMasterManager] master.HMaster: Failed to become active master
org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): SIMPLE authentication is not enabled.  Available:[TOKEN]
        at org.apache.hadoop.ipc.Client.call(Client.java:1411)
        at org.apache.hadoop.ipc.Client.call(Client.java:1364)
        at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
        at com.sun.proxy.$Proxy16.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:497)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:187)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
        at com.sun.proxy.$Proxy16.setSafeMode(Unknown Source)
        at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.setSafeMode(ClientNamenodeProtocolTranslatorPB.java:602)
        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:497)
        at org.apache.hadoop.hbase.fs.HFileSystem$1.invoke(HFileSystem.java:279)
        at com.sun.proxy.$Proxy17.setSafeMode(Unknown Source)
        at org.apache.hadoop.hdfs.DFSClient.setSafeMode(DFSClient.java:2264)
        at org.apache.hadoop.hdfs.DistributedFileSystem.setSafeMode(DistributedFileSystem.java:986)
        at org.apache.hadoop.hdfs.DistributedFileSystem.setSafeMode(DistributedFileSystem.java:970)
        at org.apache.hadoop.hbase.util.FSUtils.isInSafeMode(FSUtils.java:524)
        at org.apache.hadoop.hbase.util.FSUtils.waitOnSafeMode(FSUtils.java:970)
        at org.apache.hadoop.hbase.master.MasterFileSystem.checkRootDir(MasterFileSystem.java:417)
        at org.apache.hadoop.hbase.master.MasterFileSystem.createInitialFileSystemLayout(MasterFileSystem.java:146)
        at org.apache.hadoop.hbase.master.MasterFileSystem.<init>(MasterFileSystem.java:126)
        at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:649)
        at org.apache.hadoop.hbase.master.HMaster.access$500(HMaster.java:182)
        at org.apache.hadoop.hbase.master.HMaster$1.run(HMaster.java:1646)
        at java.lang.Thread.run(Thread.java:745)
2016-03-13 13:07:36,576 FATAL [10.0.0.164:16000.activeMasterManager] master.HMaster: Unhandled exception. Starting shutdown. 

I have read many posts and not sure if I have missed any step to enable SIMPLE authentication. Pls help.

Jatin
  • 63
  • 2
  • 8

1 Answers1

3

I believe the problem is caused by the mismatch of the hdfs port setting between core-site.xml and hbase-site.xml