Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

can not access hbase

Solved Go to solution

can not access hbase

New Contributor

Kerberos version: 1.10.3-10

HBase version: 1.1.1

<Pre-condition>

1. Kerberos Installed

<Reproduce steps>

1. use root to create hbase4 account

2. registered hbase4 in Kerberos server

3. change user to hbase4 ($su hbase4)

4. get ticket: kinit -k -t /etc/security/keytabs/hbase4.user.keytab hbase4@EXAMPLE.COM

5. $cd /usr/hdp/2.3.0.0-2557/hbase/bin

6. $./hbase shell

7. hbase(main):001:0> create 'results','name','scores'

Actual Result: ERROR: org.apache.hadoop.hbase.security.AccessDeniedException: Insufficient permissions (user=hbase4@EXAMPLE.COM, scope=default, params= [namespace=default,table=default:results1,family=name|scores],action=CREATE)

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: can not access hbase

Guru

You are getting an Access control exception, because the by default the user is not allowed to create a table. You should give either global level or namespace level privileges to the desired user so that that user can create a table.

Out of the box, only the HBase user will have permissions to grant other permissions, so you have to log in as the hbase user.

You can check https://hbase.apache.org/book.html#appendix_acl_matrix and the security section in the book.

4 REPLIES 4

Re: can not access hbase

Mentor

@Archer Huang

kinit as hbase user and then

grant  'hbase4', 'RWCA'
Highlighted

Re: can not access hbase

Guru

You are getting an Access control exception, because the by default the user is not allowed to create a table. You should give either global level or namespace level privileges to the desired user so that that user can create a table.

Out of the box, only the HBase user will have permissions to grant other permissions, so you have to log in as the hbase user.

You can check https://hbase.apache.org/book.html#appendix_acl_matrix and the security section in the book.

Re: can not access hbase

Mentor

@Archer Huang has this been resolved? Can you accept the best answer or provide your own solution?

Re: can not access hbase

New Contributor

# sudo -u hbase kinit -kt /etc/security/keytabs/hbase.service.keytab hbase/hive-spike.example.com@EXAMPLE.COM

# sudo -u hbase hbase shell

hbase(main):001:0> grant 'hbase4','RWCA'

Don't have an account?
Coming from Hortonworks? Activate your account here