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't start hiveserver2 after ranger0.6 hive plugin installed

can't start hiveserver2 after ranger0.6 hive plugin installed

New Contributor

Hi,

when i try to start hiveserver2 after using ranger-0.6.0-SNAPSHOT-hive-plugin, When I searched Hiveserver2 logs, I found the below log:

ERROR [main]: service.CompositeService (CompositeService.java:start(74)) - Error star ting services HiveServer2 java.lang.AbstractMethodError: org.apache.ranger.authorization.hive.authorizer.RangerHiveAuthorizer.filterLis tCmdObjects(Ljava/util/List;Lorg/apache/hadoop/hive/ql/security/authorization/plugin/HiveAuthzContext;)Ljava/ util/List; at org.apache.hadoop.hive.ql.security.authorization.plugin.AuthorizationMetaStoreFilterHook.getFilter edObjects(AuthorizationMetaStoreFilterHook.java:79) at org.apache.hadoop.hive.ql.security.authorization.plugin.AuthorizationMetaStoreFilterHook.filterDat abases(AuthorizationMetaStoreFilterHook.java:54) at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getDatabases(HiveMetaStoreClient.java:1020) at org.apache.hive.service.cli.CLIService.start(CLIService.java:152) at org.apache.hive.service.CompositeService.start(CompositeService.java:70) at org.apache.hive.service.server.HiveServer2.start(HiveServer2.java:300) at org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:346) at org.apache.hive.service.server.HiveServer2.access$700(HiveServer2.java:74) at org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:588) at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hadoop.util.RunJar.run(RunJar.java:221) at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

2016-06-06 00:48:47,379 INFO [main]: service.AbstractService (AbstractService.java:stop(125)) - Service:Oper ationManager is stopped. 2016-06-06 00:48:47,379 INFO [main]: service.AbstractService (AbstractService.java:stop(125)) - Service:Sess ionManager is stopped. 2016-06-06 00:48:57,381 INFO [main]: service.AbstractService (AbstractService.java:stop(125)) - Service:CLIS ervice is stopped. 2016-06-06 00:48:57,382 INFO [main]: server.HiveServer2 (HiveServer2.java:stop(305)) - Shutting down HiveSer ver2 2016-06-06 00:48:57,382 WARN [main]: server.HiveServer2 (HiveServer2.java:startHiveServer2(376)) - Error sta rting HiveServer2 on attempt 1, will retry in 60 seconds

With the using of ranger-0.6.0-SNAPSHOT-hive-plugin, the error occured everytime when hiveserver2 start, when I use the ranger-admin to add new policy, the policy can't work, and after a few minutes, the hiveserver2 shutdown after 30 times try.

My ranger-0.6.0-SNAPSHOT-hive-plugin intall.properites document are setup as below:

POLICY_MGR_URL=http://10.10.4.212:6080

SQL_CONNECTOR_JAR=/usr/share/java/mysql-connector-java.jar

REPOSITORY_NAME=hivetest06062

XAAUDIT.SOLR.ENABLE=true XAAUDIT.SOLR.URL=http://localhost:6083/solr/ranger_audits

XAAUDIT.SOLR.USER=root XAAUDIT.SOLR.PASSWORD=******

XAAUDIT.SOLR.ZOOKEEPER=NONE XAAUDIT.SOLR.FILE_SPOOL_DIR=/var/log/hive/audit/solr/spool

2 REPLIES 2
Highlighted

Re: can't start hiveserver2 after ranger0.6 hive plugin installed

New Contributor

I have tried to reset my cluster, but in a new hadoop cluster, the old error still happen, I hope get help here , thanks

Highlighted

Re: can't start hiveserver2 after ranger0.6 hive plugin installed

New Contributor

The reason is the filterListCmdObjects in hive is

List<HivePrivilegeObject> filterListCmdObjects(List<HivePrivilegeObject> listObjs,HiveAuthzContext context)

but in ranger 0.6 is

public List<HivePrivilegeObject> filterListCmdObjects(List<HivePrivilegeObject> objs,QueryContext              context)
Don't have an account?
Coming from Hortonworks? Activate your account here