You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/12/15 20:48:35 UTC

[GitHub] [druid] gabrieledarrigo opened a new issue #12074: Cannot construct instance of `org.apache.druid.security.ranger.authorizer.RangerAuthorizer`, problem: `java.lang.NullPointerException`

gabrieledarrigo opened a new issue #12074:
URL: https://github.com/apache/druid/issues/12074


   ### Affected Version
   
   Apache Druid 0.22.0
   Zookeper 3.5
   
   ### Description
   
   I'm working on a dockerized Druid cluster, similar to the one defined here: 
   
   https://github.com/apache/druid/blob/0.22.0/distribution/docker/docker-compose.yml
   
   I'm trying to integrate the Apache Ranger extension;  
   I managed to find the undocumented `druid-ranger-security.xml` configuration file (here is another issue that I recently opened: https://github.com/apache/druid/issues/12059) that I correctly mount to the Coordinator `/opt/druid/conf/druid/cluster/_common/` folder, but when I startup the cluster I get back the following error:
   
   ```
   Problem parsing object at prefix[druid.auth.authorizer.ranger]: Cannot construct instance of org.apache.druid.security.ranger.authorizer.RangerAuthorizer, problem: java.lang.NullPointerException
    at [Source: UNKNOWN; line: -1, column: -1].
     at org.apache.druid.server.initialization.AuthorizerMapperModule.configure(AuthorizerMapperModule.java:57) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> org.apache.druid.server.initialization.AuthorizerMapperModule)
     at org.apache.druid.server.initialization.AuthorizerMapperModule.configure(AuthorizerMapperModule.java:57) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> org.apache.druid.server.initialization.AuthorizerMapperModule)
     while locating org.apache.druid.server.security.AuthorizerMapper
       for the 1st parameter of org.apache.druid.security.basic.authorization.db.updater.CoordinatorBasicAuthorizerMetadataStorageUpdater.<init>(CoordinatorBasicAuthorizerMetadataStorageUpdater.java:116)
     at org.apache.druid.security.basic.authorization.db.updater.CoordinatorBasicAuthorizerMetadataStorageUpdater.class(CoordinatorBasicAuthorizerMetadataStorageUpdater.java:77)
     while locating org.apache.druid.security.basic.authorization.db.updater.CoordinatorBasicAuthorizerMetadataStorageUpdater
     at org.apache.druid.security.basic.BasicSecurityDruidModule.createAuthorizerStorageUpdater(BasicSecurityDruidModule.java:158) (via modules: com.google.inject.util.Modules$OverrideModule -> org.apache.druid.security.basic.BasicSecurityDruidModule)
     at org.apache.druid.security.basic.BasicSecurityDruidModule.createAuthorizerStorageUpdater(BasicSecurityDruidModule.java:158) (via modules: com.google.inject.util.Modules$OverrideModule -> org.apache.druid.security.basic.BasicSecurityDruidModule)
     while locating org.apache.druid.security.basic.authorization.db.updater.BasicAuthorizerMetadataStorageUpdater
   Caused by: java.lang.IllegalArgumentException: Cannot construct instance of org.apache.druid.security.ranger.authorizer.RangerAuthorizer, problem: java.lang.NullPointerException
   ```
   Here's my environment file with the authenticator and authorizer configuration (in fact, the same one of the documentation):
   
   https://gist.github.com/gabrieledarrigo/f03869706a968f4d05c0412076a668fb
   
   And here's my druid-ranger-security.xml:
   
   ```xml
   <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
   <configuration xmlns:xi="http://www.w3.org/2001/XInclude">
       <property>
           <name>ranger.plugin.druid.service.name</name>
           <value>ranger</value>
           <description>
               Name of the Ranger service containing policies for this SampleApp instance
           </description>
       </property>
   
       <property>
           <name>ranger.plugin.druid.policy.source.impl</name>
           <value>org.apache.druid.security.ranger.authorizer.RangerAdminClientImpl</value>
           <description>
               Policy source.
           </description>
       </property>
   
       <property>
           <name>ranger.plugin.druid.policy.pollIntervalMs</name>
           <value>30000</value>
           <description>
               How often to poll for changes in policies?
           </description>
       </property>
   
       <property>
           <name>ranger.plugin.druid.policy.cache.dir</name>
           <value>${project.build.directory}</value>
           <description>
               Directory where Ranger policies are cached after successful retrieval from the source
           </description>
       </property>
   </configuration>
   ```
   
   Someone got any idea on what is causing the exception?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] gabrieledarrigo closed issue #12074: Cannot construct instance of `org.apache.druid.security.ranger.authorizer.RangerAuthorizer`, problem: `java.lang.NullPointerException`

Posted by GitBox <gi...@apache.org>.
gabrieledarrigo closed issue #12074:
URL: https://github.com/apache/druid/issues/12074


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] gabrieledarrigo commented on issue #12074: Cannot construct instance of `org.apache.druid.security.ranger.authorizer.RangerAuthorizer`, problem: `java.lang.NullPointerException`

Posted by GitBox <gi...@apache.org>.
gabrieledarrigo commented on issue #12074:
URL: https://github.com/apache/druid/issues/12074#issuecomment-995227833


   Close due to wrong xml file name: from druid-ranger-security.xml to ranger-druid-security.xml -.-


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org