Member since
08-03-2017
4
Posts
1
Kudos Received
0
Solutions
08-07-2017
12:21 PM
Dear Ana, Thanks for the reply, The current version if ranger is 0.6.0.2.5 and HDP - 2.5.0.0. I have followed the documentation which you have posted, and tried to change the url based on the ranger version 0.6, but I am still getting the same issue of 404 not found. Below is the url detail. curl -iv -X POST -H "Content-type:application/json" -H "Accept:application/json" -u '********' https://<hostname of the edge>:6080/service/public/v2/api/policy -d test.json. Below is the response output: ========================================== Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 3128 (#0)
* Establish HTTP proxy tunnel to <edge host ip>:6080
* Server auth using Basic with user 'raj504'
> CONNECT <edge host ip>:6080 HTTP/1.1
> Host: <edge host ip>:6080
> User-Agent: curl/7.49.1
>
< HTTP/1.1 200 Connection established
HTTP/1.1 200 Connection established
<
* Proxy replied OK to CONNECT request
* TLS 1.2 connection using TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate: <edge host ip>
* Server certificate: *******. Private CA
* Server auth using Basic with user 'raj504'
> POST /service/public/v2/api/policy HTTP/1.1
> Host: <edge host ip>:6080
> Authorization: Basic cmFqNTA0OlJBbWExOTg0QCo=
> User-Agent: curl/7.49.1
> Content-type:application/json
> Accept:application/json
> Content-Length: 9
>
* upload completely sent off: 9 out of 9 bytes
< HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
< Server: Apache-Coyote/1.1
Server: Apache-Coyote/1.1
< Set-Cookie: RANGERADMINSESSIONID=AF78310CA9D2C433B349ED5767928211; Path=/; Secure; HttpOnly
Set-Cookie: RANGERADMINSESSIONID=AF78310CA9D2C433B349ED5767928211; Path=/; Secure; HttpOnly
< WWW-Authenticate: Negotiate
WWW-Authenticate: Negotiate
< Set-Cookie: hadoop.auth=; Path=/; Domain=<edge host ip>; Expires=Thu, 01-Jan-1970 00:00:00 GMT; Secure; HttpOnly
Set-Cookie: hadoop.auth=; Path=/; Domain=<edge host ip>; Expires=Thu, 01-Jan-1970 00:00:00 GMT; Secure; HttpOnly
< X-Frame-Options: DENY
X-Frame-Options: DENY
< Content-Length: 0
Content-Length: 0
< Date: Mon, 07 Aug 2017 10:58:03 GMT
Date: Mon, 07 Aug 2017 10:58:03 GMT
<
* Connection #0 to host 127.0.0.1 left intact ================================================================== I was getting the same error when I was using /service/plugins/policies while doing POST. This issue only happens during POST, however when I try to do GET / DELETE it works fine, as I am able to retrieve the details of the policy from the ranger and I am also able to delete the policy. Not sure, where I am getting it wrong during the POST?
... View more
08-07-2017
08:40 AM
Hello I am trying to create policy using rest api, but I am always getting 404 Not Found error. curl -iv -X POST -H "Content-type:application/json" -H "Accept:application/json" -u '********' https://<hostname of the edge>:6080/service/plugins/policies -d test.json I enter the password, but after that I am getting the above error. This error only come during POST but not during GET / DELETE, in that case it is working fine for us.
... View more
Labels:
- Labels:
-
Apache Ranger