<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Is there a way to force Ranger user-sync to run manually? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/110371#M73219</link>
    <description>&lt;P&gt;Restarting is the only way&lt;/P&gt;</description>
    <pubDate>Fri, 04 Mar 2016 14:13:35 GMT</pubDate>
    <dc:creator>vperiasamy</dc:creator>
    <dc:date>2016-03-04T14:13:35Z</dc:date>
    <item>
      <title>Is there a way to force Ranger user-sync to run manually?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/110370#M73218</link>
      <description>&lt;P&gt;...Well, short of restarting Ranger of course. I have ranger.usersync.sleeptimeinmillisbetweensynccycle=60000, but after adding a new user in LDAP, sometimes it appears in Ranger quickly, and sometimes not even after 15 minutes.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2016 14:04:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/110370#M73218</guid>
      <dc:creator>pminovic</dc:creator>
      <dc:date>2016-03-04T14:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to force Ranger user-sync to run manually?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/110371#M73219</link>
      <description>&lt;P&gt;Restarting is the only way&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2016 14:13:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/110371#M73219</guid>
      <dc:creator>vperiasamy</dc:creator>
      <dc:date>2016-03-04T14:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to force Ranger user-sync to run manually?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/110372#M73220</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/177/pminovic.html" nodeid="177" target="_blank"&gt;@Predrag Minovic&lt;/A&gt;
Do a  &lt;/P&gt;&lt;PRE&gt;vi /etc/ranger/usersync/conf/ranger-ugsync-site.xml&lt;/PRE&gt;&lt;P&gt;What is in your ranger.usersync.source.impl.class property?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2596-screen-shot-2016-03-04-at-12952-am.png" style="width: 623px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23318iB72ADF4F557577B8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2596-screen-shot-2016-03-04-at-12952-am.png" alt="2596-screen-shot-2016-03-04-at-12952-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Yes try in a chron job run for Unix:&lt;/P&gt;&lt;PRE&gt;java -Dlogdir=/var/log/ranger/usersync -cp "/usr/hdp/current/ranger-usersync/dist/unixusersync-0.5.0.2.3.2.0-2950.jar:/usr/hdp/current/ranger-usersync/lib/*:/etc/ranger/usersync/conf" org.apache.ranger.unixusersync.process.UnixUserGroupBuilder&lt;/PRE&gt;&lt;P&gt;OR for LDAP&lt;/P&gt;&lt;PRE&gt;java -Dlogdir=/var/log/ranger/usersync -cp  "/usr/hdp/current/ranger-usersync/dist/unixusersync-0.5.0.2.3.2.0-2950.jar:/usr/hdp/current/ranger-usersync/lib/*:/etc/ranger/usersync/conf" org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Aug 2019 11:27:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/110372#M73220</guid>
      <dc:creator>amcbarnett</dc:creator>
      <dc:date>2019-08-19T11:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to force Ranger user-sync to run manually?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/110373#M73221</link>
      <description>&lt;P&gt;This looks promising, I'll try it very soon.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2016 15:07:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/110373#M73221</guid>
      <dc:creator>pminovic</dc:creator>
      <dc:date>2016-03-04T15:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to force Ranger user-sync to run manually?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/110374#M73222</link>
      <description>&lt;P&gt;@Ancil McBarnett&lt;/P&gt;&lt;P&gt;Trying to run this, but I'm getting ( Ranger
      0.5.0.2.4 ) &lt;/P&gt;&lt;P&gt;# java -Dlogdir=/var/log/ranger/usersync -cp  "/usr/hdp/current/ranger-usersync/dist/unixusersync-0.5.0.2.4.0.0-169.jar:/usr/hdp/current/ranger-usersync/lib/*:/etc/ranger/usersync/conf" org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder : Unsupported major.minor version 51.0
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
  at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
  at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
  at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder. Program will exit.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2016 23:45:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/110374#M73222</guid>
      <dc:creator>ladowny1</dc:creator>
      <dc:date>2016-05-16T23:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to force Ranger user-sync to run manually?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/110375#M73223</link>
      <description>&lt;P&gt;The correct class for LDAP/AD is&lt;/P&gt;&lt;PRE&gt;org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder
&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Jan 2017 16:22:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/110375#M73223</guid>
      <dc:creator>frank93</dc:creator>
      <dc:date>2017-01-13T16:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to force Ranger user-sync to run manually?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/110376#M73224</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/177/pminovic.html" nodeid="177"&gt;@Predrag Minovic&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;You can set the interval of UserSync by ranger.usersync.sleeptimeinmillisbetweensynccycle, but there's a minimum value for each UserSync source.&lt;/P&gt;&lt;P&gt;Please check &lt;A href="https://github.com/apache/incubator-ranger/blob/master/ugsync/src/main/java/org/apache/ranger/unixusersync/config/UserGroupSyncConfig.java" target="_blank"&gt;https://github.com/apache/incubator-ranger/blob/master/ugsync/src/main/java/org/apache/ranger/unixusersync/config/UserGroupSyncConfig.java&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and grep this code by "UGSYNC_SLEEP_TIME_IN_MILLIS_BETWEEN_CYCLE_LDAP_DEFAULT_VALUE".&lt;/P&gt;&lt;P&gt;In UNIX, 1 minute, but in LDAP, 1 hour.&lt;/P&gt;&lt;P&gt;I think this is the reason of "sometimes not even after 15 minutes."&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 09:21:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/110376#M73224</guid>
      <dc:creator>toide</dc:creator>
      <dc:date>2018-09-11T09:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to force Ranger user-sync to run manually?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/270007#M207222</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have the same problem, as they say spends a lot of time and does not synchronize with the AD, only way restarting the service. But I wanted to know if there was any way to do it manually and force the synchronize.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found a way but I wanted to know if they have a less invasive way&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://sugan.fun/2018/08/06/quick-modify-jar-class/" target="_blank"&gt;https://sugan.fun/2018/08/06/quick-modify-jar-class/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 09:05:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/270007#M207222</guid>
      <dc:creator>Peruvian81</dc:creator>
      <dc:date>2019-09-09T09:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to force Ranger user-sync to run manually?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/318533#M227481</link>
      <description>&lt;P&gt;A bit late to the party, but hope the following will help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By calling the main functions of the classes,&amp;nbsp;&lt;/P&gt;&lt;P&gt;UnixUserGroupBuilder,&amp;nbsp;PolicyMgrUserGroupBuilder or&amp;nbsp;LdapUserGroupBuilder&lt;/P&gt;&lt;P&gt;is not going to work, since the main classes of these are only initializing the classes. In order to start the actual sync, the function&amp;nbsp;updateSink needs to be called. During startup this is handled by the class&lt;/P&gt;&lt;PRE&gt;org.apache.ranger.usergroupsync.UserGroupSync&lt;/PRE&gt;&lt;P&gt;thus, calling its main function will trigger the syncing using the configuration that you set in your cluster.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A complete example for triggering the usersync manually could be:&lt;/P&gt;&lt;PRE&gt;java -Dlogdir=/var/&lt;SPAN&gt;log&lt;/SPAN&gt;/ranger/usersync -&lt;SPAN&gt;cp&lt;/SPAN&gt; &lt;SPAN&gt;"/usr/hdp/current/ranger-usersync/dist/unixusersync-1.2.0.3.1.5.135-2.jar:/usr/hdp/current/ranger-usersync/lib/*:/etc/ranger/usersync/conf"&lt;/SPAN&gt; org.apache.ranger.usergroupsync.UserGroupSync&lt;/PRE&gt;&lt;P&gt;for HDP and&lt;/P&gt;&lt;PRE&gt;java -Dlogdir=/var/log/ranger/usersync -cp "/opt/cloudera/parcels/CDH/lib/ranger-usersync/dist/unixusersync-2.1.7.1.7.0-460.jar:/opt/cloudera/parcels/CDH/lib/ranger-usersync/lib/*:/etc/ranger/usersync/conf" org.apache.ranger.usergroupsync.UserGroupSync&lt;/PRE&gt;&lt;P&gt;for CDP.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 15:16:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-there-a-way-to-force-Ranger-user-sync-to-run-manually/m-p/318533#M227481</guid>
      <dc:creator>fzsombor</dc:creator>
      <dc:date>2021-06-14T15:16:50Z</dc:date>
    </item>
  </channel>
</rss>

