- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Ranger Create Policy API returns 404
- Labels:
-
Apache Ranger
Created ‎12-23-2016 08:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm having trouble using the endpoint `service/public/v2/api/policy` to create policies (Returns 404) but I can get policy by id. Is there some special permission for that endpoint?
Created ‎12-29-2016 06:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to create a policy successfully with the command-line in your post. There should be some log in one of these files: xa_portal.log, catalina.out, most recent access_log*.log. Can you check again?
This error could be due to incorrect JSON as well - if this is the cause, error details should be in catalina.out.
Created ‎12-23-2016 08:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you take look at xa_portal.log to troubleshoot further? If you can send details of the REST API call made and the response, it can help find the root cause.
Created ‎12-28-2016 05:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No new logs from the request seem to appear in xa_portal.log. I'm doing: curl -iv -u admin:admin -H "Content-Type: application/json" -X POST http://localhost:6080/service/public/v2/api/policy -d @test.json
Created ‎12-30-2016 03:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you post the contents of test.json? A malformed json file will result in a 404 error, as you described.
Created ‎12-28-2016 06:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
any clues from catalina.out and access_log.*.log files?
Created ‎12-28-2016 06:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No new logs seem to show up when I send the request.
Created ‎12-29-2016 06:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to create a policy successfully with the command-line in your post. There should be some log in one of these files: xa_portal.log, catalina.out, most recent access_log*.log. Can you check again?
This error could be due to incorrect JSON as well - if this is the cause, error details should be in catalina.out.
Created ‎12-30-2016 05:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to get it working after removing an extra bracket in my json. Thanks.
