lwyang created RANGER-3412:
------------------------------
Summary: PolicyRefresher does not work
Key: RANGER-3412
URL: https://issues.apache.org/jira/browse/RANGER-3412
Project: Ranger
Issue Type: Bug
Components: plugins
Affects Versions: 2.1.0
Reporter: lwyang
When {{PolicyRefresher.run()}} method throws an exception, PolicyRefresher does
not work
{{PolicyRefresher.run }}throws an SocketException, then the PolicyRefresher
thread exit, policy will not be updated anymore
2021-09-13,15:58:57,137 ERROR org.apache.ranger.plugin.util.PolicyRefresher:
PolicyRefresher(serviceName=misql-chnbj): failed to refresh policies. Will
continue to use last known version of policies (61944)
submarine_spark_ranger_project.com.sun.jersey.api.client.ClientHandlerException:
java.net.SocketException: Connection reset at
submarine_spark_ranger_project.com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:644)
at
submarine_spark_ranger_project.com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:586)
at
org.apache.ranger.admin.client.RangerAdminRESTClient.getServicePoliciesIfUpdated(RangerAdminRESTClient.java:191)
at
org.apache.ranger.plugin.util.PolicyRefresher.loadPolicyfromPolicyAdmin(PolicyRefresher.java:306)
at
org.apache.ranger.plugin.util.PolicyRefresher.loadPolicy(PolicyRefresher.java:246)
at
org.apache.ranger.plugin.util.PolicyRefresher.run(PolicyRefresher.java:208)
Caused by: java.net.SocketException: Connection reset at
java.net.SocketInputStream.read(SocketInputStream.java:210) at
java.net.SocketInputStream.read(SocketInputStream.java:141) at
java.io.BufferedInputStream.fill(BufferedInputStream.java:246) at
java.io.BufferedInputStream.read1(BufferedInputStream.java:286) at
java.io.BufferedInputStream.read(BufferedInputStream.java:345) at
sun.net.www.http.ChunkedInputStream.fastRead(ChunkedInputStream.java:244) at
sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:689) at
java.io.FilterInputStream.read(FilterInputStream.java:133) at
sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3444)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)