Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Ranger API - Import Policies from File Occasional Error

avatar
Contributor

I have a NiFi flow that is exporting Ranger Policies from one Cloudera Cluster and another NiFi flow that is importing them into another NiFi cluster. The API call to export them is ${ranger.local.baseurl}/service/plugins/policies/exportJson? and the API call to import them is ${ranger.local.baseurl}/service/plugins/policies/importPoliciesFromFile?

Everything works great but once in a blue moon when trying to import the Policies I get - {"statusCode":1,"msgDesc":"XXPolicy not found","messageList":[{"name":"DATA_NOT_FOUND","rbKey":"xa.error.data_not_found","message":"Data not found","objectId":295}]}

The best solution I have right now is to restart Ranger Admin and after it works. Does anyone know why this happens or how it gets into this state?

1 ACCEPTED SOLUTION

avatar
Explorer

Hello @drewski7 

The error you're seeing suggests that Ranger Admin can't find the "XXPolicy" during the import process. This can happen due to a corrupted policy file or an issue with Ranger Admin. Restarting Ranger Admin temporarily fixes the issue, but it's not a permanent solution. To troubleshoot the issue, you can check the policy file for errors, look at the Ranger Admin logs for any warnings, verify that the policy exists in the Ranger database, and ensure that Ranger Admin is configured correctly. If you can't identify the root cause, you can contact Cloudera support for assistance.

 
I hope this will help you.

View solution in original post

1 REPLY 1

avatar
Explorer

Hello @drewski7 

The error you're seeing suggests that Ranger Admin can't find the "XXPolicy" during the import process. This can happen due to a corrupted policy file or an issue with Ranger Admin. Restarting Ranger Admin temporarily fixes the issue, but it's not a permanent solution. To troubleshoot the issue, you can check the policy file for errors, look at the Ranger Admin logs for any warnings, verify that the policy exists in the Ranger database, and ensure that Ranger Admin is configured correctly. If you can't identify the root cause, you can contact Cloudera support for assistance.

 
I hope this will help you.