Support Questions

Find answers, ask questions, and share your expertise

How to add another HiveServer for current metastore ?

avatar
Super Collaborator

Hello

I have a cluster (HDP 2.3.2) with one edge node serving as Hive Server (running hiveserver2). This server is used for Hive ETL processes and also for end users that query the hive databases. Because this server is very busy i want to add another edge server that will be dedicated for the ETL processes, thus ending up with one edge node for ETL processes (that insert data to Hive tables), and a different edge node that serves end users for querying the same hive tables. I've added the new host to the cluster, ran the add HiveServer2 wizard. The Amabri shows everything is up and running. When i login to the new edge node, run "beeline" and login to hive but i can't see the tables in my old hive metastore. It is as if these are two completely separate instances.

I need two different servers looking at the same Hive metastore\DB. Any ideas how can i acomplish this ?

1 ACCEPTED SOLUTION

avatar
Master Mentor
@Adi Jabkowsky

Take a look on the error logs...

ERROR [HiveServer2-Background-Pool: Thread-165]: authorizer.RangerHiveAuthorizer (RangerHiveAuthorizer.java:filterListCmdObjects(430)) - filterListCmdObjects: Internal error: null RangerAccessResult object received back from isAccessAllowed()!

View solution in original post

12 REPLIES 12

avatar
Super Collaborator

When i'm connected to the additional hiveserver and run beeline >>> show tables i get no tables

In the log it says:

2016-11-01 12:11:59,214 INFO [HiveServer2-Background-Pool: Thread-165]: HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(372)) - ugi=adijaip=unknown-ip-addr cmd=get_tables: db=default pat=.* 2016-11-01 12:11:59,229 WARN [HiveServer2-Background-Pool: Thread-165]: security.UserGroupInformation (UserGroupInformation.java:getGroupNames(1521)) - No groups available for user adija 2016-11-01 12:11:59,230 ERROR [HiveServer2-Background-Pool: Thread-165]: authorizer.RangerHiveAuthorizer (RangerHiveAuthorizer.java:filterListCmdObjects(430)) - filterListCmdObjects: Internal error: null RangerAccessResult object received back from isAccessAllowed()!

avatar
Master Mentor
@Adi Jabkowsky

Take a look on the error logs...

ERROR [HiveServer2-Background-Pool: Thread-165]: authorizer.RangerHiveAuthorizer (RangerHiveAuthorizer.java:filterListCmdObjects(430)) - filterListCmdObjects: Internal error: null RangerAccessResult object received back from isAccessAllowed()!

avatar
Super Collaborator
@Neeraj Sabharwal

@srai

Thanks for the observation, i haven't considered this as a Ranger issue because it says that Access is allowed..

Anyways - disabling Ranger plugin fixed the issue.... but i need the Ranger plugin so i could manage Hive authorizations using Ranger.

Can't i use two HiveServer2 instances while managing hive auth using Ranger ??

avatar
Guru

good catch Neeraj. You can try disabling the ranger plugin via Ambari to test if it works otherwise.

avatar
Super Collaborator

I've noticed that in the new Edge running the HiveServer2 in /etc/hive/conf/conf.server the ranger-hive-audit.xml & ranger-hive-security.xml were configured with localhost values.

Fixed the issue by setting the server name instead of localhost in Ranger settings (Ambari) (External URL, authServiceHostName etc.)

Now the new server can contact the Ranger and Hive is working. Thank you for the heads up !

avatar
Rising Star

I face the same isssue. i have 2 HS2 server. Can't i use two HiveServer2 instances while managing hive auth using Ranger ??

avatar
Super Collaborator

@suresh krish

Please see my answer just above your comment:

"Fixed the issue by setting the server name instead of localhost in Ranger settings (Ambari) (External URL, authServiceHostName etc.)"

avatar
Rising Star

may i know the property please.. which property to change.

avatar
Rising Star

i dont find any local host entry in my configuration. all i see is sever name. no local host entries