HBase cannot assign permissions to users

Source: Internet
Author: User
Tags hdfs dfs

HBase cannot assign permissions to users

HBase cannot assign permissions to users and reports an error.

Problem background description:

In the test environment, hdfs is formatted. Many hdfs-based environments are affected. Hbase is also affected. However, when hbase is started on the master, as long as the hdfs has a/hbase directory

An error occurred while granting permissions after creating the table.

Hbase (main): 001: 0> user_permission
User Namespace, Table, Family, Qualifier: Permission
ERROR: DISABLED: Security features are not available
Hbase (main): 001: 0> grant 'test _ user', 'rwxca', 'test _ table'
ERROR: DISABLED: Security features are not available
Here is some help for this command:
Grant users specific rights.
Syntax: grant <user>, <permissions> [, <@ namespace> [, <table> [, <column family> [, <column qualifier>]
Hbase (main): 002: 0> hbase: acl
NoMethodError: undefined method 'hbase 'for # <Object: 0x2a37210>

2. In the beginning, I thought there was a syntax error. No, it's a very simple syntax. After testing several commands, we found that all commands related to permissions failed.

Baidu has some suggestions. You need to check the parameters. If the following parameters are set correctly, the problem persists.

Hbase. master. keytab. file
Hbase. master. kerberos. principal
Hbase. regionserver. keytab. file
Hbase. regionserver. kerberos. principal
Hbase. coprocessor. master. classes
Hbase. coprocessor. region. classes
Hbase. security. authorization

3. Baidu goes to the following link, which describes:

Reference

Https://community.hortonworks.com/questions/50984/security-features-not-available-in-hbase-kerberize.html
It seems your hbase: acl table is not created.
Can you check hbase-site.xml at master side as well it shoshould have :-
<Property>
<Name> hbase. coprocessor. master. classes </name>
<Value> org. apache. Hadoop. hbase. security. access. AccessController </value>
</Property>
Try restarting your cluster as postStartMaster step shocould create this table, once you are able to do scan 'hbase: acl', you will not see above error "ERROR: DISABLED: security features are not available"

4. The following sentence reminds me whether hbase: acl is lost?

Try restarting your cluster as postStartMaster step shocould create this table, once you are able to do scan 'hbase: acl'

5. I checked and found that it was actually gone.

6. The normal situation should be:

7. Find the cause of the problem and start to find a solution. Continue to Baidu (search technical documentation, especially Miss google)

How to reconstruct hbase: acl? Hbase does not have any special settings during the installation process. You only need to create a/hbase directory on hdfs and start hbase master to automatically create the required files. Why didn't I create the acl table again after I restarted it several times?

Check The hbase master log. You can see The error "The table hbase: acl does not exist in meta but has a znode. run hbck to fix inconsistencies." through The hbase hbck command, there is no error. The problem has not been solved.

16:41:40, 011 INFO [testserver: 16000. activeMasterManager] master. HMaster: Master has completed initialization
16:41:40, 016 INFO [testserver: 16000. activeMasterManager] quotas. MasterQuotaManager: Quota support disabled
16:41:40, 062 INFO [testserver: 16000. activeMasterManager] master. HMaster: Client = null/null create 'hbase: acl', {NAME => 'l', DATA_BLOCK_ENCODING => 'none', BLOOMFILTER => 'none ', REPLICATION_SCOPE => '0', COMPRESSION => 'none', VERSIONS => '1', TTL => 'forever', MIN_VERSIONS => '0 ', CACHE_DATA_IN_L1 => 'true', KEEP_DELETED_CELLS => 'false', BLOCKSIZE => '000000', IN_MEMORY => 'true', BLOCKCACHE => 'true '}
16:41:40, 200 WARN [ProcedureExecutorThread-1] procedure. CreateTableProcedure: The table hbase: acl does not exist in meta but has a znode. run hbck to fix inconsistencies.
16:41:40, 202 ERROR [testserver: 16000. activeMasterManager] master. HMaster: Coprocessor postStartMaster () hook failed
Org. apache. hadoop. hbase. TableExistsException: hbase: acl
At org. apache. hadoop. hbase. master. procedure. CreateTableProcedure. prepareCreate (CreateTableProcedure. java: 300)
At org.apache.hadoop.hbase.master.procedure.CreateTableProcedure.exe cuteFromState (CreateTableProcedure. java: 107)
At org.apache.hadoop.hbase.master.procedure.CreateTableProcedure.exe cuteFromState (CreateTableProcedure. java: 58)
At org.apache.hadoop.hbase.procedure2.StateMachineProcedure.exe cute (StateMachineProcedure. java: 107)
At org. apache. hadoop. hbase. procedure2.Procedure. doExecute (Procedure. java: 427)
At org.apache.hadoop.hbase.procedure2.ProcedureExecutor.exe cProcedure (ProcedureExecutor. java: 999)
At org.apache.hadoop.hbase.procedure2.ProcedureExecutor.exe cLoop (ProcedureExecutor. java: 803)
At org.apache.hadoop.hbase.procedure2.ProcedureExecutor.exe cLoop (ProcedureExecutor. java: 756)
At org. apache. hadoop. hbase. procedure2.ProcedureExecutor. access $200 (ProcedureExecutor. java: 75)
At org. apache. hadoop. hbase. procedure2.ProcedureExecutor $ 1.run( ProcedureExecutor. java: 441)
16:41:40, 496 INFO [ProcedureExecutorThread-1] procedure2.ProcedureExecutor: Rolledback procedure CreateTableProcedure (table = hbase: acl) id = 2 owner = hbase state = ROLLEDBACK exec-time = 299 msec exception = org. apache. hadoop. hbase. tableExistsException: hbase: acl
16:46:05, 790 INFO [LruBlockCacheStatsExecutor] hfile. lruBlockCache: totalSize = 3.24 MB, freeSize = 3.08 GB, max = 3.08 GB, blockCount = 0, accesses = 0, hits = 0, hitRatio = 0, cachingAccesses = 0, cachingHits = 0, cachingHitsRatio = 0, evictions = 29, evicted = 0, evictedPerRun = 0.0

8. The above error is reported. Since the znode problem has been clearly stated, let's check the situation on zookeeper.

As you can see, the information about failed authorization is recorded in the acl path of znode.

Hbase zkcli
[Zk: 192.168.0.72: 2181,192.168 .0.73: 2181,192.168 .0.74: 2181 (CONNECTED) 3] ls/hbase
[Meta-region-server, acl, backup-masters, table, draining, region-in-transition, running, table-lock, balancer, master, tokenauth, namespace, hbaseid, online-snapshot, replication, splitWAL, recovering-regions, rs, flush-table-proc]
[Zk: 192.168.0.72: 2181,192.168 .0.73: 2181,192.168 .0.74: 2181 (CONNECTED) 4] ls/hbase/acl
[@ Test_user]

9. delete/hbase information on zk, restart the entire hbase cluster, and enable hbase to automatically recreate the acl table.

[Zk: 192.168.0.72: 2181,192.168 .0.73: 2181,192.168 .0.74: 2181 (CONNECTED) 6] rmr/hbase
[Zk: 192.168.0.72: 2181,192.168 .0.73: 2181,192.168 .0.74: 2181 (CONNECTED) 7] ls/
[Alert, kafka-manager-1.3.3.13, rmstore, yarn-leader-election, kafka10-dev2, livy, kafka10, kafka10-dev, dubbo, eos, alert_leader, election, DP, hadoop-ha, zookeeper, leader, user]
[Zk: 192.168.0.72: 2181,192.168 .0.73: 2181,192.168 .0.74: 2181 (CONNECTED) 8] [hbase @ testserver ~] $ Exit

10. You can see that the file is back.

[Hdfs @ testserver ~] $ Hdfs dfs-ls/hbase/data/hbase
Found 3 items
Drwxrwx ----hbase hadoop 0/hbase/data/hbase/acl
Drwxrwx ----hbase hadoop 0 16:2-2-24 16:59/hbase/data/hbase/meta
Drwxrwx ----hbase hadoop 0/hbase/data/hbase/namespace

11. You can also view the acl table.

Hbase (main): 004: 0> scan 'hbase: acl'
Row column + CELL
Test_table column = l: hbase, timestamp = 1519463374193, value = RWXCA
Test_table_01 column = l: hbase, timestamp = 1519463409831, value = RWXCA
User_01 column = l: hbase, timestamp = 1519463393177, value = RWXCA
3 row (s) in 0.1600 seconds

If you encounter problems and understand the principle of the overall architecture, you can solve them with a purposeful and in-depth step-by-step check.

Install and configure https://www.bkjia.com/Linux/2017-04/143048.htm for HBase standalone and pseudo distributed mode in Ubuntu 14.04
Hadoop + HBase cloud storage construction summary PDF https://www.bkjia.com/Linux/2013-05/83844.htm
Ubuntu Server 14.04 Hbase database installation https://www.bkjia.com/Linux/2016-05/131499.htm
Regionserver startup failure https://www.bkjia.com/Linux/2013-06/86655.htm caused by inconsistent time between HBase nodes
In-depth understanding of HBase architecture principle https://www.bkjia.com/Linux/2017-01/139173.htm
Hadoop cluster Installation & HBase lab environment build https://www.bkjia.com/Linux/2013-04/83560.htm
Hadoop-based HBase cluster configuration https://www.bkjia.com/Linux/2013-03/80815.htm'
Hadoop installation and deployment notes-HBase full distribution mode installation https://www.bkjia.com/Linux/2012-12/76947.htm
CentOS 6.4 HBase cluster installation https://www.bkjia.com/Linux/2016-11/137303.htm

HBase details: click here
HBase: click here

This article permanently updates link: https://www.bkjia.com/Linux/2018-03/151441.htm

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.