Support Questions

Find answers, ask questions, and share your expertise

HIVE policies not working

avatar
Super Collaborator

I enabled ranger hive plugin but policies are not working and getting sync

Below is the error logs -

ERROR util.PolicyRefresher (PolicyRefresher.java:loadPolicyfromPolicyAdmin(228)) - PolicyRefresher(serviceName=datametica): failed to refresh policies. Will continue to use last known version of policies (13)
java.lang.IllegalArgumentException: Illegal character in scheme name at index 0:  http://dm1.example.com:6080/service/plugins/policies/download/datametica
	at java.net.URI.create(URI.java:859)
	at com.sun.jersey.api.client.Client.resource(Client.java:433)
	at org.apache.ranger.plugin.util.RangerRESTClient.getResource(RangerRESTClient.java:157)
	at org.apache.ranger.admin.client.RangerAdminRESTClient.createWebResource(RangerAdminRESTClient.java:162)
	at org.apache.ranger.admin.client.RangerAdminRESTClient.getServicePoliciesIfUpdated(RangerAdminRESTClient.java:70)
	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.net.URISyntaxException: Illegal character in scheme name at index 0:  http://dm1.example.com:6080/service/plugins/policies/download/datametica
	at java.net.URI$Parser.fail(URI.java:2829)
	at java.net.URI$Parser.checkChars(URI.java:3002)
	at java.net.URI$Parser.checkChar(URI.java:3012)
	at java.net.URI$Parser.parse(URI.java:3028)
	at java.net.URI.<init>(URI.java:595)
	at java.net.URI.create(URI.java:857
1 ACCEPTED SOLUTION

avatar
Super Guru
@chennuri gouri shankar

Can you check External URL in Ambari Ranger Configs?

This should be pointing to proper url on which ranger is pointing.

for eg. http://<ranger_host>:6080

View solution in original post

4 REPLIES 4

avatar
Super Guru
@chennuri gouri shankar

Can you check External URL in Ambari Ranger Configs?

This should be pointing to proper url on which ranger is pointing.

for eg. http://<ranger_host>:6080

avatar
Super Collaborator

Somehow the url was modified. It worked now. Thanks

avatar
Super Collaborator

@chennuri gouri shankar looks like you have a space in front of your ranger admin url. check it out and remove it if its there . " http://dm1.example.com:6080/service/plugins/policies/download/datametica"

avatar
Super Collaborator

There is no space i checked that