Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-2348

Error getting policies for hiveserver2 Interactive

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 1.2.0
    • None
    • plugins
    • None

    Description

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

      The stack trace is the following:

       

      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]
      
      
      

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            dvergari Davide Vergari
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: