Category Archives: HBase

  • 0

Error: org.apache.hadoop.hbase.security.AccessDeniedException: Insufficient permissions

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.


  • 0

Enable logging for client connections and running queries with Phoenix Query Server

Phoenix Query server (PQS) does not log details about client connections and the queries run using the default log level of INFO. It is required to modify the log4j configuration for certain classes to obtain such logs.

To enable logging such messages by PQS, perform the following:

  1. On the node that runs PQS service, edit the file: ‘/usr/hdp/current/phoenix-server/bin/log4j.properties’, and add/replace the following properties:

               log4j.threshold=DEBUG
log4j.logger.org.apache.phoenix.queryserver=DEBUG
log4j.logger.org.apache.phoenix.queryserver.server=DEBUG
log4j.logger.org.apache.phoenix=DEBUG
log4j.logger.org.eclipse.jetty.io.AbstractEndPoint=DEBUG

  1. Restart the Phoenix Query Server on the node.

Note: It is important to understand that by increasing the logging level using the steps above, the PQS log file size increases faster in comparison to the default logging level.