You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Bharat Mallela <bh...@in.ibm.com> on 2015/07/30 14:59:26 UTC

Need Help in running Hive ranger plugin


Hi Ranger dev team,

I am facing a problem in ranger hive plugin. The communication between
ranger server and plugin is not happening.

Installed versions
Hive version: 0.14 (as part of Ambari)
Ranger 0.5

Configurations:
===========
Service Name: hivedev
jdbc.driverClassName : com.mysql.jdbc.Driver
Jdbc.url : jdbc:mysql://bdvs1669.******/hive

when ever I do test connection, am getting

Connection Failed.
Unable to retrieve any databases using given parameters. You can still save
the repository and start creating policies, but you would not be able to
use autocomplete for resource names. Check xa_portal.log for more info.


But with the given user and password I can connect to database and access
hive database


[root@bdvs1669 ranger-hive-plugin]# mysql -u hive -p
Enter password:

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| hive               |
| mysql              |
| test               |
+--------------------+
4 rows in set (0.00 sec)


After this I saved the service and created a dummy policy and also
installed the hive plugin on bdvs1669

plugin shows as enabled:

[root@bdvs1669 ranger-hive-plugin]# cat /etc/hive/conf/ranger-security.xml
<ranger>\n<enabled>Tue Jul 28 22:10:27 PDT 2015</enabled>\n</ranger>
[root@bdvs1669 ranger-hive-plugin]#

and also enabled debug logs by putting
log4j.logger.com.xasecure.pdp.hive=DEBUG,DRFA in hive-log4j and restarted
hive. There are no plugin logs  (attaching hiveserver2.log)

policy cache is empty:

[root@bdvs1669 ranger-hive-plugin]# ls /etc/ranger/hivedev/policycache/
[root@bdvs1669 ranger-hive-plugin]#


I am attaching logs for reference. Please help me out in enabling
communication between hive plugin and server.


(See attached file: hiverser2.log)(See attached file: xa_portal.log)

Thanks
Bharat lal. M


Re: Need Help in running Hive ranger plugin

Posted by Don Bosco Durai <bo...@apache.org>.
Bharat, the attachments didn¹t come. Can you create a JIRA and attach them
to it?

Thanks

Bosco

From:  Bharat Mallela <bh...@in.ibm.com>
Reply-To:  "dev@ranger.incubator.apache.org"
<de...@ranger.incubator.apache.org>
Date:  Thursday, July 30, 2015 at 5:59 AM
To:  "dev@ranger.incubator.apache.org" <de...@ranger.incubator.apache.org>
Subject:  Need Help in running Hive ranger plugin

> Hi Ranger dev team,
> 
> I am facing a problem in ranger hive plugin. The communication between ranger
> server and plugin is not happening.
> 
> Installed versions
> Hive version: 0.14 (as part of Ambari)
> Ranger 0.5
> 
> Configurations:
> ===========
> Service Name: hivedev
> jdbc.driverClassName : com.mysql.jdbc.Driver
> Jdbc.url : jdbc:mysql://bdvs1669.******/hive
> 
> when ever I do test connection, am getting
> 
> Connection Failed.
> Unable to retrieve any databases using given parameters. You can still save
> the repository and start creating policies, but you would not be able to use
> autocomplete for resource names. Check xa_portal.log for more info.
> 
> 
> But with the given user and password I can connect to database and access hive
> database
> 
> 
> [root@bdvs1669 ranger-hive-plugin]# mysql -u hive -p
> Enter password:
> 
> mysql> show databases;
> +--------------------+
> | Database           |
> +--------------------+
> | information_schema |
> | hive               |
> | mysql              |
> | test               |
> +--------------------+
> 4 rows in set (0.00 sec)
> 
> 
> After this I saved the service and created a dummy policy and also installed
> the hive plugin on bdvs1669
> 
> plugin shows as enabled:
> 
> [root@bdvs1669 ranger-hive-plugin]# cat /etc/hive/conf/ranger-security.xml
> <ranger>\n<enabled>Tue Jul 28 22:10:27 PDT 2015</enabled>\n</ranger>
> [root@bdvs1669 ranger-hive-plugin]#
> 
> and also enabled debug logs by putting
> log4j.logger.com.xasecure.pdp.hive=DEBUG,DRFA in hive-log4j and restarted
> hive. There are no plugin logs  (attaching hiveserver2.log)
> 
> policy cache is empty:
> 
> [root@bdvs1669 ranger-hive-plugin]# ls /etc/ranger/hivedev/policycache/
> [root@bdvs1669 ranger-hive-plugin]#
> 
> 
> I am attaching logs for reference. Please help me out in enabling
> communication between hive plugin and server.
> 
> 
> (See attached file: hiverser2.log)(See attached file: xa_portal.log)
> 
> Thanks
> Bharat lal. M
> 
> 



Re: Need Help in running Hive ranger plugin

Posted by Alok Lal <al...@hortonworks.com>.
Bharat,

For Ranger 0.5 the best might be to turn debugging on at the level of org.apache.ranger.  com.xasecure.pdp.hive was relevant for Ranger 0.4.x.

Also note that the log files for this would be created in the /tmp/hive directory of hiveserver2 install.

Thanks





On 7/30/15, 10:09 AM, "Ramesh Mani" <rm...@hortonworks.com> wrote:

>Bharat,
>
>Is this cluster kerberized one?  Please re-attach the xa_portal.log. I don't see that in the email.
>
>Regards,
>Ramesh
>
>From: Bharat Mallela <bh...@in.ibm.com>>
>Reply-To: "dev@ranger.incubator.apache.org<ma...@ranger.incubator.apache.org>" <de...@ranger.incubator.apache.org>>
>Date: Thursday, July 30, 2015 at 5:59 AM
>To: "dev@ranger.incubator.apache.org<ma...@ranger.incubator.apache.org>" <de...@ranger.incubator.apache.org>>
>Subject: Need Help in running Hive ranger plugin
>
>
>Hi Ranger dev team,
>
>I am facing a problem in ranger hive plugin. The communication between ranger server and plugin is not happening.
>
>Installed versions
>Hive version: 0.14 (as part of Ambari)
>Ranger 0.5
>
>Configurations:
>===========
>Service Name: hivedev
>jdbc.driverClassName : com.mysql.jdbc.Driver
>Jdbc.url : jdbc:mysql://bdvs1669.******/hive
>
>when ever I do test connection, am getting
>
>Connection Failed.
>Unable to retrieve any databases using given parameters. You can still save the repository and start creating policies, but you would not be able to use autocomplete for resource names. Check xa_portal.log for more info.
>
>
>But with the given user and password I can connect to database and access hive database
>
>
>[root@bdvs1669 ranger-hive-plugin]# mysql -u hive -p
>Enter password:
>
>mysql> show databases;
>+--------------------+
>| Database           |
>+--------------------+
>| information_schema |
>| hive               |
>| mysql              |
>| test               |
>+--------------------+
>4 rows in set (0.00 sec)
>
>
>After this I saved the service and created a dummy policy and also installed the hive plugin on bdvs1669
>
>plugin shows as enabled:
>
>[root@bdvs1669 ranger-hive-plugin]# cat /etc/hive/conf/ranger-security.xml
><ranger>\n<enabled>Tue Jul 28 22:10:27 PDT 2015</enabled>\n</ranger>
>[root@bdvs1669 ranger-hive-plugin]#
>
>and also enabled debug logs by putting log4j.logger.com.xasecure.pdp.hive=DEBUG,DRFA in hive-log4j and restarted hive. There are no plugin logs  (attaching hiveserver2.log)
>
>policy cache is empty:
>
>[root@bdvs1669 ranger-hive-plugin]# ls /etc/ranger/hivedev/policycache/
>[root@bdvs1669 ranger-hive-plugin]#
>
>
>I am attaching logs for reference. Please help me out in enabling communication between hive plugin and server.
>
>
>(See attached file: hiverser2.log)(See attached file: xa_portal.log)
>
>Thanks
>Bharat lal. M
>
>

Re: Need Help in running Hive ranger plugin

Posted by Ramesh Mani <rm...@hortonworks.com>.
Bharat,

Is this cluster kerberized one?  Please re-attach the xa_portal.log. I don't see that in the email.

Regards,
Ramesh

From: Bharat Mallela <bh...@in.ibm.com>>
Reply-To: "dev@ranger.incubator.apache.org<ma...@ranger.incubator.apache.org>" <de...@ranger.incubator.apache.org>>
Date: Thursday, July 30, 2015 at 5:59 AM
To: "dev@ranger.incubator.apache.org<ma...@ranger.incubator.apache.org>" <de...@ranger.incubator.apache.org>>
Subject: Need Help in running Hive ranger plugin


Hi Ranger dev team,

I am facing a problem in ranger hive plugin. The communication between ranger server and plugin is not happening.

Installed versions
Hive version: 0.14 (as part of Ambari)
Ranger 0.5

Configurations:
===========
Service Name: hivedev
jdbc.driverClassName : com.mysql.jdbc.Driver
Jdbc.url : jdbc:mysql://bdvs1669.******/hive

when ever I do test connection, am getting

Connection Failed.
Unable to retrieve any databases using given parameters. You can still save the repository and start creating policies, but you would not be able to use autocomplete for resource names. Check xa_portal.log for more info.


But with the given user and password I can connect to database and access hive database


[root@bdvs1669 ranger-hive-plugin]# mysql -u hive -p
Enter password:

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| hive               |
| mysql              |
| test               |
+--------------------+
4 rows in set (0.00 sec)


After this I saved the service and created a dummy policy and also installed the hive plugin on bdvs1669

plugin shows as enabled:

[root@bdvs1669 ranger-hive-plugin]# cat /etc/hive/conf/ranger-security.xml
<ranger>\n<enabled>Tue Jul 28 22:10:27 PDT 2015</enabled>\n</ranger>
[root@bdvs1669 ranger-hive-plugin]#

and also enabled debug logs by putting log4j.logger.com.xasecure.pdp.hive=DEBUG,DRFA in hive-log4j and restarted hive. There are no plugin logs  (attaching hiveserver2.log)

policy cache is empty:

[root@bdvs1669 ranger-hive-plugin]# ls /etc/ranger/hivedev/policycache/
[root@bdvs1669 ranger-hive-plugin]#


I am attaching logs for reference. Please help me out in enabling communication between hive plugin and server.


(See attached file: hiverser2.log)(See attached file: xa_portal.log)

Thanks
Bharat lal. M