<?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 Ambari LDAP user/group sync failed in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111250#M74098</link>
    <description>&lt;P&gt;I've tried to integrate Ambari with AD. I was able to integrate that without encrypting passwords, but once I tried to encrypt passwords for the sake of security, I stuck at user/group sync step. I've followed the following manual.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.0/bk_security/content/_optional_encrypt_database_and_ldap_passwords.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.0/bk_security/content/_optional_encrypt_database_and_ldap_passwords.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;After passing the encryption step, I tried to synchronise user/groups with using "ambari-server sync-ldap --all". Unfortunately, that command failed and once I checked the ambari-server log, there was an error as "Configuration:1850 - Cannot read password for alias = ${alias=ambari.ldap.manager.password}". Is this some kind of bug or have I missed any step?&lt;/P&gt;&lt;P&gt;FYI I am using HDP 2.5.0 and Ambari 2.4.1.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jan 2017 11:39:59 GMT</pubDate>
    <dc:creator>alinazemian</dc:creator>
    <dc:date>2017-01-04T11:39:59Z</dc:date>
    <item>
      <title>Ambari LDAP user/group sync failed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111250#M74098</link>
      <description>&lt;P&gt;I've tried to integrate Ambari with AD. I was able to integrate that without encrypting passwords, but once I tried to encrypt passwords for the sake of security, I stuck at user/group sync step. I've followed the following manual.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.0/bk_security/content/_optional_encrypt_database_and_ldap_passwords.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.0/bk_security/content/_optional_encrypt_database_and_ldap_passwords.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;After passing the encryption step, I tried to synchronise user/groups with using "ambari-server sync-ldap --all". Unfortunately, that command failed and once I checked the ambari-server log, there was an error as "Configuration:1850 - Cannot read password for alias = ${alias=ambari.ldap.manager.password}". Is this some kind of bug or have I missed any step?&lt;/P&gt;&lt;P&gt;FYI I am using HDP 2.5.0 and Ambari 2.4.1.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2017 11:39:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111250#M74098</guid>
      <dc:creator>alinazemian</dc:creator>
      <dc:date>2017-01-04T11:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari LDAP user/group sync failed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111251#M74099</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/14705/alinazemian.html" nodeid="14705"&gt;@Ali Nazemian&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;I see this is a BUG Please check the link - &lt;A href="https://issues.apache.org/jira/browse/AMBARI-2644" target="_blank"&gt;https://issues.apache.org/jira/browse/AMBARI-2644&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Below is the HWX bug url - &lt;A href="https://hortonworks.jira.com/browse/BUG-7301" target="_blank"&gt;https://hortonworks.jira.com/browse/BUG-7301&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There is Patch provided to fix this issue.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2017 14:10:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111251#M74099</guid>
      <dc:creator>sshimpi</dc:creator>
      <dc:date>2017-01-04T14:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari LDAP user/group sync failed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111252#M74100</link>
      <description>&lt;P&gt;Has it been fixed already in 2.4.1 version?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2017 14:35:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111252#M74100</guid>
      <dc:creator>alinazemian</dc:creator>
      <dc:date>2017-01-04T14:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari LDAP user/group sync failed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111253#M74101</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/14705/alinazemian.html" nodeid="14705"&gt;@Ali Nazemian&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You are using 2.4.1 where this can happen when the encrypted password  is null/empty.  &lt;/P&gt;&lt;PRE&gt;      if (result != null) {
        password = new String(result);
      } else {
        LOG.error("Cannot read password for alias = " + aliasStr);
      }&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://github.com/apache/ambari/blob/release-2.4.1/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java#L1847-L1850" target="_blank"&gt;https://github.com/apache/ambari/blob/release-2.4.1/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java#L1847-L1850&lt;/A&gt;&lt;/P&gt;&lt;P&gt;- So i am suspecting that your Password encryption was not done successfully.  So try the encryption again.    Or try removing the encryption and then freshly enable the password encryption: &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(OLD Doc but should work) &lt;/STRONG&gt;&lt;A href="https://ambari.apache.org/current/installing-hadoop-using-ambari/content/ch02s06s01s02.html" target="_blank"&gt;https://ambari.apache.org/current/installing-hadoop-using-ambari/content/ch02s06s01s02.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;- And do not forget to restart ambari server after enabling the encryption.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2017 14:42:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111253#M74101</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-01-04T14:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari LDAP user/group sync failed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111254#M74102</link>
      <description>&lt;P&gt;Can it be related to having special characters in the provided password?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2017 20:05:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111254#M74102</guid>
      <dc:creator>alinazemian</dc:creator>
      <dc:date>2017-01-04T20:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari LDAP user/group sync failed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111255#M74103</link>
      <description>&lt;P&gt;A special character should not really affect this, however it may depend on how &lt;EM&gt;special&lt;/EM&gt; that character is. If it is just a normal ASCII letter, number, or punctuation, it will be fine. However if the character is not in the western latin character set, it may not have a valid translation.  But I do not think that you would see the error message you posted. &lt;/P&gt;&lt;P&gt;That said, it is possible that your key did not make it into the Ambari credential store.  Yo can check that by listing the keys in the credential store:&lt;/P&gt;&lt;PRE&gt;$JAVA_HOME/bin/keytool -list -keystore /var/lib/ambari-server/keys/credentials.jceks -storetype JCEKS&lt;/PRE&gt;&lt;P&gt;In my case $JAVA_HOME is /usr/jdk64/jdk1.8.0_77, so you might want to call the command using something like&lt;/P&gt;&lt;PRE&gt;/usr/jdk64/jdk1.8.0_77/bin/keytool -list -keystore /var/lib/ambari-server/keys/credentials.jceks -storetype JCEKS&lt;/PRE&gt;&lt;P&gt;After running this command, you will be prompted for a password. That password is the &lt;STRONG&gt;&lt;EM&gt;master&lt;/EM&gt;&lt;/STRONG&gt; password you set when enabling this feature. &lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;PRE&gt;# /usr/jdk64/jdk1.8.0_77/bin/keytool -list -keystore /var/lib/ambari-server/keys/credentials.jceks -storetype JCEKS
Enter keystore password:

Keystore type: JCEKS
Keystore provider: SunJCE

Your keystore contains 2 entries

ambari.ldap.manager.password, Jan 4, 2017, SecretKeyEntry,
ambari.db.password, Jan 4, 2017, SecretKeyEntry,
&lt;/PRE&gt;&lt;P&gt;Here we see that the &lt;B&gt;ambari.ldap.manager.password&lt;/B&gt; alias exists. &lt;/P&gt;&lt;P&gt; 
In my ambari.properties, we see that the &lt;STRONG&gt;ambari.ldap.manager.password&lt;/STRONG&gt; alias is assigned to the LDAP manager password property: &lt;/P&gt;&lt;PRE&gt;authentication.ldap.managerPassword=${alias=ambari.ldap.manager.password} &lt;/PRE&gt;&lt;P&gt;If your credential store does not have the &lt;STRONG&gt;ambari.ldap.manager.password &lt;/STRONG&gt;entry, then we should be able to add it by rerunning the &lt;STRONG&gt;ambari-server setup-ldap&lt;/STRONG&gt; command. Or you can try to manually add the password to the credential store using the &lt;STRONG&gt;keytool&lt;/STRONG&gt; command like: &lt;/P&gt;&lt;PRE&gt;$JAVA_HOME/bin/keytool -importpass -alias ambari.ldap.manager.password -keystore /var/lib/ambari-server/keys/credentials.jceks -storetype JCEKS &lt;/PRE&gt;&lt;P&gt;For example, &lt;/P&gt;&lt;PRE&gt;/usr/jdk64/jdk1.8.0_77/bin/keytool -importpass -alias ambari.ldap.manager.password -keystore /var/lib/ambari-server/keys/credentials.jceks -storetype JCEKS
Enter keystore password:
Enter the password to be stored:
Re-enter password:
Enter key password for &amp;lt;ambari.ldap.manager.password&amp;gt;
	(RETURN if same as keystore password):
&lt;/PRE&gt;&lt;P&gt;I entered the &lt;STRONG&gt;master&lt;/STRONG&gt; password at the first prompt and the LDAP manager password for the next 2 prompts.  I simply hit the return key for the last prompt.&lt;/P&gt;&lt;P&gt;Maybe this will help. &lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2017 23:01:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111255#M74103</guid>
      <dc:creator>rlevas</dc:creator>
      <dc:date>2017-01-04T23:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari LDAP user/group sync failed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111256#M74104</link>
      <description>&lt;P&gt;I have managed to solve the issue. It was related to have an escaping characters in the provided password. I've used a simpler password and everything is working now.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 13:27:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111256#M74104</guid>
      <dc:creator>alinazemian</dc:creator>
      <dc:date>2017-01-05T13:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari LDAP user/group sync failed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111257#M74105</link>
      <description>&lt;P&gt;Thank you very much, but it was because of having escaping characters inside the password. I saw kind of similar issues for using complex passwords for other HDF and HDP applications as well.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 13:29:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-LDAP-user-group-sync-failed/m-p/111257#M74105</guid>
      <dc:creator>alinazemian</dc:creator>
      <dc:date>2017-01-05T13:29:04Z</dc:date>
    </item>
  </channel>
</rss>

