Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

can not access hbase

avatar
Explorer

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

avatar
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.

View solution in original post

4 REPLIES 4

avatar
Master Mentor

@Archer Huang

kinit as hbase user and then

grant  'hbase4', 'RWCA'

avatar
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.

avatar
Master Mentor

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

avatar
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'