You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ranger.apache.org by wenxing zheng <we...@gmail.com> on 2017/06/15 01:24:55 UTC

Failure in refreshing the Hadoop Policy from Ranger

Dear experts,

I got the following error in the Hadoop logs and found that the Hadoop
Ranger plugin failed to refresh the policy from Ranger admin.

From the ranger admin, we got the 302 when downloading the polices.

*Ranger Admin Access logs*

192.168.26.202 - - [15/Jun/2017:01:22:36 +0000] "GET
/service/plugins/secure/policies/download/hadoop_ranger?lastKnownVersion=-1&lastActivationTime=0&pluginId=hdfs@cs-hdp-nn-03.dataservice.net-hadoop_ranger
HTTP/1.1" 302 - "-" "Java/1.8.0_101"

*Hadoop HDFS logs*


> 2017-06-15 09:17:54,070 ERROR
> org.apache.ranger.plugin.util.PolicyRefresher:
> PolicyRefresher(serviceName=hadoop_ranger): failed to refresh policies.
> Will continue to use last known version of policies (-1)
> com.sun.jersey.api.client.ClientHandlerException: A message body reader
> for Java class org.apache.ranger.plugin.util.ServicePolicies, and Java type
> class org.apache.ranger.plugin.util.ServicePolicies, and MIME media type
> text/html; charset=ISO-8859-1 was not found
>         at
> com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:549)
>         at
> com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:506)
>         at
> org.apache.ranger.admin.client.RangerAdminRESTClient.getServicePoliciesIfUpdated(RangerAdminRESTClient.java:141)
>         at
> org.apache.ranger.plugin.util.PolicyRefresher.loadPolicyfromPolicyAdmin(PolicyRefresher.java:264)
>         at
> org.apache.ranger.plugin.util.PolicyRefresher.loadPolicy(PolicyRefresher.java:202)
>         at
> org.apache.ranger.plugin.util.PolicyRefresher.run(PolicyRefresher.java:171)
> 2017-06-15 09:17:54,070 WARN
> org.apache.ranger.plugin.util.PolicyRefresher: cache file does not exist or
> not readable '/etc/ranger/hadoop_ranger/policycache/hdfs_hadoop_ranger.json'
> 2017-06-15 09:18:24,078 ERROR
> org.apache.ranger.plugin.util.PolicyRefresher:


What would be the problem here? Appreciated for any hints

Regards, Wenxing

Re: Re: Failure in refreshing the Hadoop Policy from Ranger

Posted by wenxing zheng <we...@gmail.com>.
please find the attached file for reference.

Regards, Wenxing

On Thu, Jun 15, 2017 at 3:13 PM, luochong@gdbigdata.com <
luochong@gdbigdata.com> wrote:

> Hi,
> cookie_domain  is a parameter of install.properties?
>
> But  I  fail to find this parameter.  Could you share me the correct
> install.properties  ?
>
> Thanks & Regards
>
> ------------------------------
> luochong@gdbigdata.com
>
>
> *From:* wenxing zheng <we...@gmail.com>
> *Date:* 2017-06-15 14:55
> *To:* user <us...@ranger.apache.org>
> *Subject:* Re: Failure in refreshing the Hadoop Policy from Ranger
> finally we found we missed the "cookie_domain" in the install.properties.
> After filling it with FQDN name, it works.
>
> It seemed we have to fill most of the parameters listed in the
> install.properties, otherwise we will meet big troubles.
>
> On Thu, Jun 15, 2017 at 9:25 AM, wenxing zheng <we...@gmail.com>
> wrote:
>
>> Sorry for missing the version info:
>> Ranger: 0.7.1
>> Hadoop: 2.7.3
>>
>>
>> On Thu, Jun 15, 2017 at 9:24 AM, wenxing zheng <we...@gmail.com>
>> wrote:
>>
>>> Dear experts,
>>>
>>> I got the following error in the Hadoop logs and found that the Hadoop
>>> Ranger plugin failed to refresh the policy from Ranger admin.
>>>
>>> From the ranger admin, we got the 302 when downloading the polices.
>>>
>>> *Ranger Admin Access logs*
>>>
>>> 192.168.26.202 - - [15/Jun/2017:01:22:36 +0000] "GET
>>> /service/plugins/secure/policies/download/hadoop_ranger?last
>>> KnownVersion=-1&lastActivationTime=0&pluginId=hdfs@cs-hdp-
>>> nn-03.dataservice.net-hadoop_ranger HTTP/1.1" 302 - "-" "Java/1.8.0_101"
>>>
>>> *Hadoop HDFS logs*
>>>
>>>
>>>> 2017-06-15 09:17:54,070 ERROR org.apache.ranger.plugin.util.PolicyRefresher:
>>>> PolicyRefresher(serviceName=hadoop_ranger): failed to refresh
>>>> policies. Will continue to use last known version of policies (-1)
>>>> com.sun.jersey.api.client.ClientHandlerException: A message body
>>>> reader for Java class org.apache.ranger.plugin.util.ServicePolicies,
>>>> and Java type class org.apache.ranger.plugin.util.ServicePolicies, and
>>>> MIME media type text/html; charset=ISO-8859-1 was not found
>>>>         at com.sun.jersey.api.client.ClientResponse.getEntity(ClientRes
>>>> ponse.java:549)
>>>>         at com.sun.jersey.api.client.ClientResponse.getEntity(ClientRes
>>>> ponse.java:506)
>>>>         at org.apache.ranger.admin.client.RangerAdminRESTClient.getServ
>>>> icePoliciesIfUpdated(RangerAdminRESTClient.java:141)
>>>>         at org.apache.ranger.plugin.util.PolicyRefresher.loadPolicyfrom
>>>> PolicyAdmin(PolicyRefresher.java:264)
>>>>         at org.apache.ranger.plugin.util.PolicyRefresher.loadPolicy(Pol
>>>> icyRefresher.java:202)
>>>>         at org.apache.ranger.plugin.util.PolicyRefresher.run(PolicyRefr
>>>> esher.java:171)
>>>> 2017-06-15 09:17:54,070 WARN org.apache.ranger.plugin.util.PolicyRefresher:
>>>> cache file does not exist or not readable '/etc/ranger/hadoop_ranger/pol
>>>> icycache/hdfs_hadoop_ranger.json'
>>>> 2017-06-15 09:18:24,078 ERROR org.apache.ranger.plugin.util.
>>>> PolicyRefresher:
>>>
>>>
>>> What would be the problem here? Appreciated for any hints
>>>
>>> Regards, Wenxing
>>>
>>
>>
>

Re: Re: Failure in refreshing the Hadoop Policy from Ranger

Posted by "luochong@gdbigdata.com" <lu...@gdbigdata.com>.
Hi, 
cookie_domain  is a parameter of install.properties?  

But  I  fail to find this parameter.  Could you share me the correct install.properties  ?

Thanks & Regards



luochong@gdbigdata.com
 
From: wenxing zheng
Date: 2017-06-15 14:55
To: user
Subject: Re: Failure in refreshing the Hadoop Policy from Ranger
finally we found we missed the "cookie_domain" in the install.properties. After filling it with FQDN name, it works.

It seemed we have to fill most of the parameters listed in the install.properties, otherwise we will meet big troubles.

On Thu, Jun 15, 2017 at 9:25 AM, wenxing zheng <we...@gmail.com> wrote:
Sorry for missing the version info:
Ranger: 0.7.1
Hadoop: 2.7.3


On Thu, Jun 15, 2017 at 9:24 AM, wenxing zheng <we...@gmail.com> wrote:
Dear experts, 

I got the following error in the Hadoop logs and found that the Hadoop Ranger plugin failed to refresh the policy from Ranger admin.

From the ranger admin, we got the 302 when downloading the polices. 

Ranger Admin Access logs

192.168.26.202 - - [15/Jun/2017:01:22:36 +0000] "GET /service/plugins/secure/policies/download/hadoop_ranger?lastKnownVersion=-1&lastActivationTime=0&pluginId=hdfs@cs-hdp-nn-03.dataservice.net-hadoop_ranger HTTP/1.1" 302 - "-" "Java/1.8.0_101"

Hadoop HDFS logs


2017-06-15 09:17:54,070 ERROR org.apache.ranger.plugin.util.PolicyRefresher: PolicyRefresher(serviceName=hadoop_ranger): failed to refresh policies. Will continue to use last known version of policies (-1)
com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class org.apache.ranger.plugin.util.ServicePolicies, and Java type class org.apache.ranger.plugin.util.ServicePolicies, and MIME media type text/html; charset=ISO-8859-1 was not found
        at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:549)
        at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:506)
        at org.apache.ranger.admin.client.RangerAdminRESTClient.getServicePoliciesIfUpdated(RangerAdminRESTClient.java:141)
        at org.apache.ranger.plugin.util.PolicyRefresher.loadPolicyfromPolicyAdmin(PolicyRefresher.java:264)
        at org.apache.ranger.plugin.util.PolicyRefresher.loadPolicy(PolicyRefresher.java:202)
        at org.apache.ranger.plugin.util.PolicyRefresher.run(PolicyRefresher.java:171)
2017-06-15 09:17:54,070 WARN org.apache.ranger.plugin.util.PolicyRefresher: cache file does not exist or not readable '/etc/ranger/hadoop_ranger/policycache/hdfs_hadoop_ranger.json'
2017-06-15 09:18:24,078 ERROR org.apache.ranger.plugin.util.PolicyRefresher: 

What would be the problem here? Appreciated for any hints

Regards, Wenxing 



Re: Failure in refreshing the Hadoop Policy from Ranger

Posted by wenxing zheng <we...@gmail.com>.
finally we found we missed the "cookie_domain" in the install.properties.
After filling it with FQDN name, it works.

It seemed we have to fill most of the parameters listed in the
install.properties, otherwise we will meet big troubles.

On Thu, Jun 15, 2017 at 9:25 AM, wenxing zheng <we...@gmail.com>
wrote:

> Sorry for missing the version info:
> Ranger: 0.7.1
> Hadoop: 2.7.3
>
>
> On Thu, Jun 15, 2017 at 9:24 AM, wenxing zheng <we...@gmail.com>
> wrote:
>
>> Dear experts,
>>
>> I got the following error in the Hadoop logs and found that the Hadoop
>> Ranger plugin failed to refresh the policy from Ranger admin.
>>
>> From the ranger admin, we got the 302 when downloading the polices.
>>
>> *Ranger Admin Access logs*
>>
>> 192.168.26.202 - - [15/Jun/2017:01:22:36 +0000] "GET
>> /service/plugins/secure/policies/download/hadoop_ranger?
>> lastKnownVersion=-1&lastActivationTime=0&pluginId=hdfs@cs-
>> hdp-nn-03.dataservice.net-hadoop_ranger HTTP/1.1" 302 - "-"
>> "Java/1.8.0_101"
>>
>> *Hadoop HDFS logs*
>>
>>
>>> 2017-06-15 09:17:54,070 ERROR org.apache.ranger.plugin.util.PolicyRefresher:
>>> PolicyRefresher(serviceName=hadoop_ranger): failed to refresh policies.
>>> Will continue to use last known version of policies (-1)
>>> com.sun.jersey.api.client.ClientHandlerException: A message body reader
>>> for Java class org.apache.ranger.plugin.util.ServicePolicies, and Java
>>> type class org.apache.ranger.plugin.util.ServicePolicies, and MIME
>>> media type text/html; charset=ISO-8859-1 was not found
>>>         at com.sun.jersey.api.client.ClientResponse.getEntity(ClientRes
>>> ponse.java:549)
>>>         at com.sun.jersey.api.client.ClientResponse.getEntity(ClientRes
>>> ponse.java:506)
>>>         at org.apache.ranger.admin.client.RangerAdminRESTClient.getServ
>>> icePoliciesIfUpdated(RangerAdminRESTClient.java:141)
>>>         at org.apache.ranger.plugin.util.PolicyRefresher.loadPolicyfrom
>>> PolicyAdmin(PolicyRefresher.java:264)
>>>         at org.apache.ranger.plugin.util.PolicyRefresher.loadPolicy(Pol
>>> icyRefresher.java:202)
>>>         at org.apache.ranger.plugin.util.PolicyRefresher.run(PolicyRefr
>>> esher.java:171)
>>> 2017-06-15 09:17:54,070 WARN org.apache.ranger.plugin.util.PolicyRefresher:
>>> cache file does not exist or not readable '/etc/ranger/hadoop_ranger/pol
>>> icycache/hdfs_hadoop_ranger.json'
>>> 2017-06-15 09:18:24,078 ERROR org.apache.ranger.plugin.util.
>>> PolicyRefresher:
>>
>>
>> What would be the problem here? Appreciated for any hints
>>
>> Regards, Wenxing
>>
>
>

Re: Failure in refreshing the Hadoop Policy from Ranger

Posted by wenxing zheng <we...@gmail.com>.
Sorry for missing the version info:
Ranger: 0.7.1
Hadoop: 2.7.3


On Thu, Jun 15, 2017 at 9:24 AM, wenxing zheng <we...@gmail.com>
wrote:

> Dear experts,
>
> I got the following error in the Hadoop logs and found that the Hadoop
> Ranger plugin failed to refresh the policy from Ranger admin.
>
> From the ranger admin, we got the 302 when downloading the polices.
>
> *Ranger Admin Access logs*
>
> 192.168.26.202 - - [15/Jun/2017:01:22:36 +0000] "GET
> /service/plugins/secure/policies/download/hadoop_
> ranger?lastKnownVersion=-1&lastActivationTime=0&pluginId=
> hdfs@cs-hdp-nn-03.dataservice.net-hadoop_ranger HTTP/1.1" 302 - "-"
> "Java/1.8.0_101"
>
> *Hadoop HDFS logs*
>
>
>> 2017-06-15 09:17:54,070 ERROR org.apache.ranger.plugin.util.PolicyRefresher:
>> PolicyRefresher(serviceName=hadoop_ranger): failed to refresh policies.
>> Will continue to use last known version of policies (-1)
>> com.sun.jersey.api.client.ClientHandlerException: A message body reader
>> for Java class org.apache.ranger.plugin.util.ServicePolicies, and Java
>> type class org.apache.ranger.plugin.util.ServicePolicies, and MIME media
>> type text/html; charset=ISO-8859-1 was not found
>>         at com.sun.jersey.api.client.ClientResponse.getEntity(
>> ClientResponse.java:549)
>>         at com.sun.jersey.api.client.ClientResponse.getEntity(
>> ClientResponse.java:506)
>>         at org.apache.ranger.admin.client.RangerAdminRESTClient.
>> getServicePoliciesIfUpdated(RangerAdminRESTClient.java:141)
>>         at org.apache.ranger.plugin.util.PolicyRefresher.
>> loadPolicyfromPolicyAdmin(PolicyRefresher.java:264)
>>         at org.apache.ranger.plugin.util.PolicyRefresher.loadPolicy(
>> PolicyRefresher.java:202)
>>         at org.apache.ranger.plugin.util.PolicyRefresher.run(
>> PolicyRefresher.java:171)
>> 2017-06-15 09:17:54,070 WARN org.apache.ranger.plugin.util.PolicyRefresher:
>> cache file does not exist or not readable '/etc/ranger/hadoop_ranger/
>> policycache/hdfs_hadoop_ranger.json'
>> 2017-06-15 09:18:24,078 ERROR org.apache.ranger.plugin.util.
>> PolicyRefresher:
>
>
> What would be the problem here? Appreciated for any hints
>
> Regards, Wenxing
>