Hello,

I'm having a bit of trouble getting the Kafka Ranger 0.5 pluigin to load the 
configuration files.  My guess is that I have the config files in the wrong 
place.

I know normally, Ranger and Kafka are supposed to be installed natively on the 
machine, but we have a use case where they must be used with relative paths.

Currently, the jars are linked correctly and I can see in the logs that the 
plugin is starting.  I have the xml config files in Kafka's config directory.

With Log4J, I see:
[2016-05-06 13:03:01,737] ERROR PolicyRefresher(serviceName=null): failed to 
refresh policies. Will continue to use last known version of policies (-1) 
(org.apache.ranger.plugin.util.PolicyRefresher)
com.sun.jersey.api.client.ClientHandlerException: 
java.lang.IllegalArgumentException: URI is not absolute
at 
com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:151)
at com.sun.jersey.api.client.Client.handle(Client.java:648)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:507)
at 
org.apache.ranger.admin.client.RangerAdminRESTClient.getServicePoliciesIfUpdated(RangerAdminRESTClient.java:73)
at 
org.apache.ranger.plugin.util.PolicyRefresher.loadPolicyfromPolicyAdmin(PolicyRefresher.java:205)
at 
org.apache.ranger.plugin.util.PolicyRefresher.loadPolicy(PolicyRefresher.java:175)
at org.apache.ranger.plugin.util.PolicyRefresher.run(PolicyRefresher.java:154)
Caused by: java.lang.IllegalArgumentException: URI is not absolute
at java.net.URI.toURL(URI.java:1088)
at 
com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:159)
at 
com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149)
... 8 more

[2016-05-06 11:23:31,056] DEBUG ==> 
addResourceIfReadable(ranger-kafka-security.xml) 
(org.apache.ranger.authorization.hadoop.config.RangerConfiguration)
[2016-05-06 11:23:31,056] DEBUG ==> RangerPluginClassLoader.findResources()  
(org.apache.ranger.plugin.classloader.RangerPluginClassLoader)
[2016-05-06 11:23:31,056] DEBUG 
RangerPluginClassLoader.findResourcesUsingChildClassLoader(): calling 
childClassLoader.findResources() 
(org.apache.ranger.plugin.classloader.RangerPluginClassLoader)
[2016-05-06 11:23:31,056] DEBUG 
RangerPluginClassLoader.findResourcesUsingComponentClassLoader(): calling 
componentClassLoader.getResources() 
(org.apache.ranger.plugin.classloader.RangerPluginClassLoader)
[2016-05-06 11:23:31,056] DEBUG <== 
RangerPluginClassLoader.findResourcesUsingComponentClassLoader(): 
sun.misc.CompoundEnumeration@47c81abf 
(org.apache.ranger.plugin.classloader.RangerPluginClassLoader)
[2016-05-06 11:23:31,056] DEBUG <== RangerPluginClassLoader.findResources()  
(org.apache.ranger.plugin.classloader.RangerPluginClassLoader)
[2016-05-06 11:23:31,058] DEBUG ==> RangerPluginClassLoader.findResource()  
(org.apache.ranger.plugin.classloader.RangerPluginClassLoader)
[2016-05-06 11:23:31,058] DEBUG RangerPluginClassLoader.findResource(): calling 
componentClassLoader.getResources() 
(org.apache.ranger.plugin.classloader.RangerPluginClassLoader)
[2016-05-06 11:23:31,058] DEBUG <== RangerPluginClassLoader.findResource(): 
null (org.apache.ranger.plugin.classloader.RangerPluginClassLoader)
[2016-05-06 11:23:31,058] DEBUG ==> 
RangerPluginClassLoader.findResource(ranger-kafka-security.xml)  
(org.apache.ranger.plugin.classloader.RangerPluginClassLoader)
[2016-05-06 11:23:31,058] DEBUG 
RangerPluginClassLoader.findResource(ranger-kafka-security.xml): calling 
componentClassLoader.getResources() 
(org.apache.ranger.plugin.classloader.RangerPluginClassLoader)
[2016-05-06 11:23:31,058] DEBUG <== 
RangerPluginClassLoader.findResource(ranger-kafka-security.xml): null 
(org.apache.ranger.plugin.classloader.RangerPluginClassLoader)
[2016-05-06 11:23:31,058] DEBUG ==> 
RangerPluginClassLoader.findResource(/ranger-kafka-security.xml)  
(org.apache.ranger.plugin.classloader.RangerPluginClassLoader)
[2016-05-06 11:23:31,058] DEBUG 
RangerPluginClassLoader.findResource(/ranger-kafka-security.xml): calling 
componentClassLoader.getResources() 
(org.apache.ranger.plugin.classloader.RangerPluginClassLoader)
[2016-05-06 11:23:31,058] DEBUG <== 
RangerPluginClassLoader.findResource(/ranger-kafka-security.xml): null 
(org.apache.ranger.plugin.classloader.RangerPluginClassLoader)
[2016-05-06 11:23:31,058] DEBUG <== 
addResourceIfReadable(ranger-kafka-security.xml): couldn't find resource file 
location (org.apache.ranger.authorization.hadoop.config.RangerConfiguration)

Do I have these configs in the wrong location, or is there something else I'm 
missing?

Thank you for your help!

Lawrence

Reply via email to