Created 07-03-2018 11:16 AM
Hi Team,
Ranger usersync daemon is not starting in our cluster.We are using HDP-2.5.6.
We are getting following error in ranger usersync log file:
19 May 2018 00:01:25 ERROR UserGroupSync [UnixUserSyncThread] - Failed to initialize UserGroup source/sink. Will retry after 60000 milliseconds. Error details: java.lang.NoClassDefFoundError: org/apache/commons/httpclient/URIException at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.delXUserGroupInfo(PolicyMgrUserGroupBuilder.java:615) at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.delXUserGroupInfo(PolicyMgrUserGroupBuilder.java:600) at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addOrUpdateUser(PolicyMgrUserGroupBuilder.java:326) at org.apache.ranger.unixusersync.process.UnixUserGroupBuilder.updateSink(UnixUserGroupBuilder.java:92) at org.apache.ranger.usergroupsync.UserGroupSync.run(UserGroupSync.java:58) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: org.apache.commons.httpclient.URIException at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
After debugging we found that its an known issue in Ranger:
https://issues.apache.org/jira/browse/RANGER-989
As per mentioned in "RANGER-989" we have copied given jar files from ranger-admin lib to usersync lib and restarted Ranger service:
cp /usr/hdp/current/ranger-admin/ews/webapp/WEB-INF/lib/commons-httpclient-3.1.jar /usr/hdp/current/ranger-usersync/lib/ cp /usr/hdp/current/ranger-admin/ews/webapp/WEB-INF/lib/commons-codec-1.9.jar /usr/hdp/current/ranger-usersync/lib/
Still we are getting same error.
How to resolve it? Please suggest.
Thanks,
Bhushan
Created 07-03-2018 03:27 PM
Want to get a detailed solution you have to login/registered on the community
Register/LoginCreated 07-03-2018 12:52 PM
@Bhushan Kandalkar Try Copying the jars to /usr/hdp/current/ranger-usersync/lib/
Created 07-03-2018 01:18 PM
@Sandeep Nemuri, I have already copied these jars to /usr/hdp/current/ranger-usersync/lib/. But still getting same error.
Created 07-03-2018 01:01 PM
RANGER-989 is actually a duplicate of
https://issues.apache.org/jira/browse/RANGER-804
Solution to this issue was to include the following 2 jars in the lib directory for the usersync process
commons-httpclient-3.1.jar commons-codec-1.4.jar
Make sure you are on the correct node when copying the files to /usr/hdp/current/ranger-usersync/lib/ as usersync process maybe installed on separate node.
HTH
*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.
Created 07-03-2018 01:21 PM
@Felix Albani, I have copied jars at /usr/hdp/current/ranger-usersync/lib/. Also, I did these changes on Ranger machine. But still getting same error.
Created 07-03-2018 03:27 PM
Want to get a detailed solution you have to login/registered on the community
Register/LoginCreated 07-03-2018 03:43 PM
Thanks @Arshadullah Khan. That worked.