Error: org.apache.hadoop.hbase.security.AccessDeniedException: Insufficient permissions
Category : HBase
If you try to connect to phoenix server from hbase or you do some service checks then if you are facing following error then do not worry,be relax as here you will find solution of this problem.
Error :
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.3.4.0-3485/phoenix/phoenix-4.4.0.2.3.4.0-3485-client.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.3.4.0-3485/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Error: org.apache.hadoop.hbase.security.AccessDeniedException: Insufficient permissions (user=saurkuma, scope=default:SYSTEM.CATALOG, params=[table=default:SYSTEM.CATALOG],action=CREATE)
at org.apache.hadoop.hbase.security.access.AccessController.requirePermission(AccessController.java:433)
at org.apache.hadoop.hbase.security.access.AccessController.preGetTableDescriptors(AccessController.java:2447)
at org.apache.hadoop.hbase.master.MasterCoprocessorHost$75.call(MasterCoprocessorHost.java:896)
org.apache.phoenix.exception.PhoenixIOException: org.apache.hadoop.hbase.security.AccessDeniedException: Insufficient permissions (user=saurkuma, scope=default:SYSTEM.CATALOG, params=[table=default:SYSTEM.CATALOG],action=CREATE)
Root cause : You are getting an Access control exception, because by default the user is not allowed to create a table.
Resolution: 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.
[s0998dnz@m1.hdp22 ~]$ sudo su - hbase Last login: Wed Apr 5 14:52:41 EDT 2017 [hbase@m1.hdp22 ~]$ hbase shell SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/hdp/2.3.4.0-3485/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/hdp/2.3.4.0-3485/zookeeper/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] HBase Shell; enter 'help<RETURN>' for list of supported commands. Type "exit<RETURN>" to leave the HBase Shell Version 1.1.2.2.3.4.0-3485, ra2b7fd38f4dcca6eb81f99b5d37b2ea3beeef09e, Wed Dec 16 03:49:28 UTC 2015 hbase(main):001:0> grant 'saurkuma', 'RWCA' 0 row(s) in 1.3310 seconds hbase(main):002:0> grant 'ambari-qa', 'RWCA' 0 row(s) in 0.0830 seconds
Please feel free to give your valuable feedback or suggestion.