Davide  Vergari created RANGER-2348:
---------------------------------------

             Summary: Error getting policies for hiveserver2 Interactive
                 Key: RANGER-2348
                 URL: https://issues.apache.org/jira/browse/RANGER-2348
             Project: Ranger
          Issue Type: Bug
          Components: plugins
    Affects Versions: 1.2.0
            Reporter: Davide  Vergari


Ranger Admin REST Client fails on calling getServicePoliciesIfUpdated method if 
running inside hiveserver2 Interactive.

The stack trace is the following:

 
{code:java}
ERROR [Thread-9]: client.RangerAdminRESTClient 
(RangerAdminRESTClient.java:getServicePoliciesIfUpdated(167)) - Error getting 
policies for serviceName=ValuePartner_hiveresponse=null
com.sun.jersey.spi.inject.Errors$ErrorMessagesException: null
    at com.sun.jersey.spi.inject.Errors.processErrorMessages(Errors.java:170) 
~[jersey-core-1.19.3.jar:1.19.3]
    at com.sun.jersey.spi.inject.Errors.postProcess(Errors.java:136) 
~[jersey-core-1.19.3.jar:1.19.3]
    at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:199) 
~[jersey-core-1.19.3.jar:1.19.3]
    at com.sun.jersey.api.client.Client.<init>(Client.java:188) 
~[jersey-client-1.19.jar:1.19]
    at com.sun.jersey.api.client.Client.<init>(Client.java:171) 
~[jersey-client-1.19.jar:1.19]
    at com.sun.jersey.api.client.Client.create(Client.java:683) 
~[jersey-client-1.19.jar:1.19]
    at 
org.apache.ranger.plugin.util.RangerRESTClient.buildClient(RangerRESTClient.java:211)
 ~[ranger-plugins-common-1.2.0.3.1.0.0-78.jar:1.2.0.3.1.0.0-78]
    at 
org.apache.ranger.plugin.util.RangerRESTClient.getClient(RangerRESTClient.java:176)
 ~[ranger-plugins-common-1.2.0.3.1.0.0-78.jar:1.2.0.3.1.0.0-78]
    at 
org.apache.ranger.plugin.util.RangerRESTClient.getResource(RangerRESTClient.java:156)
 ~[ranger-plugins-common-1.2.0.3.1.0.0-78.jar:1.2.0.3.1.0.0-78]
    at 
org.apache.ranger.admin.client.RangerAdminRESTClient.createWebResource(RangerAdminRESTClient.java:279)
 ~[ranger-plugins-common-1.2.0.3.1.0.0-78.jar:1.2.0.3.1.0.0-78]
    at 
org.apache.ranger.admin.client.RangerAdminRESTClient.getServicePoliciesIfUpdated(RangerAdminRESTClient.java:128)
 [ranger-plugins-common-1.2.0.3.1.0.0-78.jar:1.2.0.3.1.0.0-78]
    at 
org.apache.ranger.plugin.util.PolicyRefresher.loadPolicyfromPolicyAdmin(PolicyRefresher.java:264)
 [ranger-plugins-common-1.2.0.3.1.0.0-78.jar:1.2.0.3.1.0.0-78]
    at 
org.apache.ranger.plugin.util.PolicyRefresher.loadPolicy(PolicyRefresher.java:202)
 [ranger-plugins-common-1.2.0.3.1.0.0-78.jar:1.2.0.3.1.0.0-78]
    at 
org.apache.ranger.plugin.util.PolicyRefresher.run(PolicyRefresher.java:171) 
[ranger-plugins-common-1.2.0.3.1.0.0-78.jar:1.2.0.3.1.0.0-78]


{code}
The error seems generated by the buildClient() method that always returns null. 
Running the plugin inside hiveserver2 (non interactive) works well.

 

Current workaround to use updated policies from ranger admin is to install both 
hiveserver2 and hiveserver2 Interactive on the same host



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to