<?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: Kerberos and LDAP integration in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238368#M200179</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/97969/rohangoel.html" nodeid="97969"&gt;@Rohan Goel&lt;/A&gt;&lt;P&gt;The KDC is usually on port 88.  Port 636 is the LDAPS port.  So you need to change the KDC Hosts line to read "ldap.testhdp.com" or "ldap.testhdp.com:88", or if the KDC is not listening on port 88, change 88 to the correct port. &lt;/P&gt;&lt;P&gt;When using an Active Directory, the KDC interface in the Active Directory is on port 88 (by default). I assume this can be changed, but I haven't see anyone do it... so your best bet is probably to change the KDC Hosts value to "ldap.testhdp.com".&lt;/P&gt;</description>
    <pubDate>Thu, 06 Dec 2018 22:01:46 GMT</pubDate>
    <dc:creator>rlevas</dc:creator>
    <dc:date>2018-12-06T22:01:46Z</dc:date>
    <item>
      <title>Kerberos and LDAP integration</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238367#M200178</link>
      <description>&lt;P&gt;I am creating a kerberised HDP cluster on AWS. For managing the user and groups I am using openLDAP (on RHEL 7 machine) and want to configure it to work with Kerberos.&lt;/P&gt;&lt;P&gt;I am following the&lt;A href="https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.0/bk_ambari-security/content/use_an_existing_active_directory_domain.html" rel="nofollow noopener noreferrer" target="_blank"&gt; official tutorial for setting up kerberos with existing AD&lt;/A&gt; but while testing connection during the setup it constantly fails (see screenshot).&lt;/P&gt;&lt;P&gt;I have LDAPS setup and working fine - I am able to sync users using ambari-server sync-ldap command over ldaps and also able to login to the ambari-server using the users created on openLDAP. Telnet to ldap.testhdp.com:636 (my LDAP server) from my edge node (where ambari-sevrer is installed) also works fine.&lt;/P&gt;&lt;P&gt;It is only while setting up kerberos that the connection fails.&lt;/P&gt;&lt;P&gt;Just for testing I installed krb5-server on the edge node and tried installing kerberos with a existing MIT KDC which works fine. I hope to make it work with openLDAP (existing AD)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="94449-screen-shot-2018-12-06-at-34308-pm.png" style="width: 1410px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14085i63FC8DEE93730DA4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="94449-screen-shot-2018-12-06-at-34308-pm.png" alt="94449-screen-shot-2018-12-06-at-34308-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2019 22:57:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238367#M200178</guid>
      <dc:creator>rohan_goel</dc:creator>
      <dc:date>2019-08-17T22:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberos and LDAP integration</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238368#M200179</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/97969/rohangoel.html" nodeid="97969"&gt;@Rohan Goel&lt;/A&gt;&lt;P&gt;The KDC is usually on port 88.  Port 636 is the LDAPS port.  So you need to change the KDC Hosts line to read "ldap.testhdp.com" or "ldap.testhdp.com:88", or if the KDC is not listening on port 88, change 88 to the correct port. &lt;/P&gt;&lt;P&gt;When using an Active Directory, the KDC interface in the Active Directory is on port 88 (by default). I assume this can be changed, but I haven't see anyone do it... so your best bet is probably to change the KDC Hosts value to "ldap.testhdp.com".&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 22:01:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238368#M200179</guid>
      <dc:creator>rlevas</dc:creator>
      <dc:date>2018-12-06T22:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberos and LDAP integration</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238369#M200180</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/322/rlevas.html" nodeid="322" target="_blank"&gt;@Robert Levas&lt;/A&gt; thank you for the quick response.&lt;/P&gt;&lt;P&gt;I tried your suggestion and passed through the initial step (see pic1).&lt;/P&gt;&lt;P&gt;However on proceeding further, I get an error while testing the kerberos client (see pic2 and pic3).&lt;/P&gt;&lt;P&gt;On checking ambari-server logs, I notice the error:&lt;/P&gt;&lt;PRE&gt;Caused by: org.apache.ambari.server.AmbariException: Unexpected error condition
at org.apache.ambari.server.controller.KerberosHelperImpl.validateKDCCredentials(KerberosHelperImpl.java:1935)
at org.apache.ambari.server.controller.KerberosHelperImpl.handleTestIdentity(KerberosHelperImpl.java:2230)
at org.apache.ambari.server.controller.KerberosHelperImpl.createTestIdentity(KerberosHelperImpl.java:1029)
at org.apache.ambari.server.controller.AmbariManagementControllerImpl.createAction(AmbariManagementControllerImpl.java:4216)
at org.apache.ambari.server.controller.internal.RequestResourceProvider$1.invoke(RequestResourceProvider.java:263)
at org.apache.ambari.server.controller.internal.RequestResourceProvider$1.invoke(RequestResourceProvider.java:192)
at org.apache.ambari.server.controller.internal.AbstractResourceProvider.invokeWithRetry(AbstractResourceProvider.java:455)
at org.apache.ambari.server.controller.internal.AbstractResourceProvider.createResources(AbstractResourceProvider.java:278)&lt;/PRE&gt;&lt;PRE&gt;Caused by: javax.naming.InvalidNameException: [LDAP: error code 34 - invalid DN]
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3077)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2883)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2797)
at com.sun.jndi.ldap.LdapCtx.&amp;lt;init&amp;gt;(LdapCtx.java:319)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:192)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:210)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:153)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:83)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
at javax.naming.InitialContext.init(InitialContext.java:244)
at javax.naming.ldap.InitialLdapContext.&amp;lt;init&amp;gt;(InitialLdapContext.java:154)
at org.apache.ambari.server.serveraction.kerberos.ADKerberosOperationHandler.createInitialLdapContext(ADKerberosOperationHandler.java:514)
at org.apache.ambari.server.serveraction.kerberos.ADKerberosOperationHandler.createLdapContext(ADKerberosOperationHandler.java:465)
... 102 more&lt;/PRE&gt;&lt;P&gt;I am not sure what is causing this error and couldn't find any support online either.&lt;/P&gt;&lt;P&gt;My base domain for LDAP is dc=testhdp,dc=com which works fine while authenticating using (open)LDAP alone (see pic4).&lt;/P&gt;&lt;P&gt;But here I get the error "Caused by: javax.naming.InvalidNameException: [LDAP: error code 34 - invalid DN]"&lt;/P&gt;&lt;P&gt;Can you please help me what I am doing wrong to setup LDAP working with kerberos. I have attached relevant ambari-server logs.&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/94478-logs.txt" target="_blank"&gt;logs.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="94479-pic1.png" style="width: 1392px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14081i056FA65DB4FEF42F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="94479-pic1.png" alt="94479-pic1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="94480-pic2.png" style="width: 954px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14082iEAC4BBC99C58ECBB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="94480-pic2.png" alt="94480-pic2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="94481-pic3.png" style="width: 2200px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14083iF0DFF7B8600D6508/image-size/medium?v=v2&amp;amp;px=400" role="button" title="94481-pic3.png" alt="94481-pic3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="94482-pic4.png" style="width: 440px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14084iD5AD39577DF17E5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="94482-pic4.png" alt="94482-pic4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2019 22:57:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238369#M200180</guid>
      <dc:creator>rohan_goel</dc:creator>
      <dc:date>2019-08-17T22:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberos and LDAP integration</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238370#M200181</link>
      <description>&lt;P&gt;the container, 'dc=testhdp,dc=com', seems to be rather high up in the LDAP tree.  Maybe your admin user credential does not have privs to write there.  Usually a container is created for the hadoop principals... like  'ou=hadoop,dc=testhdp,dc=com' and a user in the AD is delegated administrative access to manage user accounts in that container (some times referred to as an "O U" - I prefer "container" though).&lt;/P&gt;&lt;P&gt;Try to create a container and ensure the AD account that Ambari is using has privileges to create users in that container. &lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 22:27:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238370#M200181</guid>
      <dc:creator>rlevas</dc:creator>
      <dc:date>2018-12-07T22:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberos and LDAP integration</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238371#M200182</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/322/rlevas.html" nodeid="322"&gt;@Robert Levas&lt;/A&gt; thank you so very much. Your answer makes a lot of sense and I think this is exactly what is causing the problem. I'll create a new "OU" 'ou=hadoop,dc=testhdp,dc=com' in openLDAP right? Now my admin user in ambari is (admin) and for kerberos it is (root/admin), how do I provide it access to create the users in there? Can you please help me there? - sorry to bug you again.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Dec 2018 03:05:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238371#M200182</guid>
      <dc:creator>rohan_goel</dc:creator>
      <dc:date>2018-12-08T03:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberos and LDAP integration</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238372#M200183</link>
      <description>&lt;P&gt;OpenLDAP?  I thought this was Active Directory.  If you are not using an Active Directory, you will need to choose a different KDC type when enabling Kerberos.   &lt;/P&gt;&lt;P&gt;Ambari does not generally create users in an LDAP directory.  However when enabling Kerberos, it needs to create accounts in the KDC to store the principal names and password.  This is done differently depending on the type of KDC you are using.   For Active Directory, the method Ambari uses is to connect to its LDAP interface and create user accounts with the needed attributes.  For MIT KDC, it uses the MIT kadmin utility to request the creation of new principals and export keytab files. And for IPA, it uses the ipa client utilities to request the creation of new principals and export keytab files.   In each case, you tell Ambari what the administrator credentials are in the Enable Kerberos wizard - like you have in the screen shots above. &lt;/P&gt;</description>
      <pubDate>Sat, 08 Dec 2018 04:29:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238372#M200183</guid>
      <dc:creator>rlevas</dc:creator>
      <dc:date>2018-12-08T04:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberos and LDAP integration</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238373#M200184</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/322/rlevas.html" nodeid="322"&gt;@Robert Levas&lt;/A&gt; thank you for the clarification - I understand things better. So, now that I am using openLDAP, what KDC type then should I use then? Ambari setup only gives me two types for automated kerberos setup: AD and MIT KDC.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Dec 2018 02:20:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238373#M200184</guid>
      <dc:creator>rohan_goel</dc:creator>
      <dc:date>2018-12-09T02:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberos and LDAP integration</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238374#M200185</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/97969/rohangoel.html" nodeid="97969"&gt;@Rohan Goel&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;Active Directory is a Microsoft product that runs on a Microsoft Windows server.  It provides a lot of services for a (Windows) network.  In this case, it can also provide LDAP and KDC services for a your Hadoop cluster.  If you do not already have an Active Directory set up, or if you do not wish to use your Active Directory as a KDC for Kerberos authentication, then you probably want to install an MIT KDC.  However, if using Ambari 2.7.0 or above, you might consider IPA (or FreeIPA), since it is sort of similar to an Active Directory. An IPA server provides several services for a network like DNS, LDAP, and KCD; however, it will take some learning to get it all installed and working. &lt;/P&gt;&lt;P&gt;That said, if you are already set on using OpenLDAP, you should use the MIT KDC option.  See &lt;A href="https://web.mit.edu/kerberos/krb5-1.12/doc/admin/install.html" target="_blank"&gt;https://web.mit.edu/kerberos/krb5-1.12/doc/admin/install.html&lt;/A&gt; for information on installing this KDC.  You can even configure it to use OpenLDAP as it's backend - see &lt;A href="https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_ldap.html" target="_blank"&gt;https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_ldap.html&lt;/A&gt;.  &lt;/P&gt;&lt;P&gt;I have a script that will install an MIT KDC using the most simple options (I use it for testing) - &lt;A href="https://community.cloudera.com/legacyfs/online/attachments/95381-install-kdc-centossh.txt"&gt;install-kdc-centossh.txt&lt;/A&gt; (I needed to add the .txt extension to the .sh file to upload it here).  If you do not edit the script, it will create a KDC with the following properties:&lt;/P&gt;&lt;PRE&gt;realm: EXAMPLE.COM
administrator principal: admin/admin@EXAMPLE.COM
administrator password: hadoop&lt;/PRE&gt;&lt;P&gt;I hope this helps. &lt;/P&gt;</description>
      <pubDate>Sun, 09 Dec 2018 04:09:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238374#M200185</guid>
      <dc:creator>rlevas</dc:creator>
      <dc:date>2018-12-09T04:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberos and LDAP integration</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238375#M200186</link>
      <description>&lt;P&gt;If you are on a newer version of Ambari I recommend you take advantage of using FreeIPA option. (Basically AD for Redhat)&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 00:57:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238375#M200186</guid>
      <dc:creator>dvillarreal</dc:creator>
      <dc:date>2018-12-11T00:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberos and LDAP integration</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238376#M200187</link>
      <description>&lt;P&gt;	Thank you &lt;A rel="user" href="https://community.cloudera.com/users/322/rlevas.html" nodeid="322"&gt;@Robert Levas&lt;/A&gt; &lt;A rel="user" href="https://community.cloudera.com/users/509/dvillarreal.html" nodeid="509"&gt;@dvillarreal&lt;/A&gt;&lt;/P&gt;&lt;P&gt;	Yes, I am using a newer version of ambari and also tried FreeIPA since openLDAP didn't seem to work art all with kerberos.&lt;/P&gt;&lt;P&gt;	I followed the exact steps as on &lt;A href="https://community.hortonworks.com/articles/59645/ambari-24-kerberos-with-freeipa.html" target="_blank"&gt;https://community.hortonworks.com/articles/59645/ambari-24-kerberos-with-freeipa.html&lt;/A&gt; - everything seems to be working fine but fails when kerberizing the cluster. I get the following error:&lt;/P&gt;&lt;P&gt;	Also, important to note that while I get the following error:&lt;/P&gt;&lt;PRE&gt;DNS query for data2.testhdp.com. A failed: The DNS operation timed out after 30.0005660057 seconds DNS resolution for hostname data2.testhdp.com failed: The DNS operation timed out after 30.0005660057 seconds Failed to update DNS records. Missing A/AAAA record(s) for host data2.testhdp.com: 172.31.6.79. Missing reverse record(s) for address(es): 172.31.6.79. 	
&lt;/PRE&gt;&lt;P&gt;I installed server as:&lt;/P&gt;&lt;PRE&gt;ipa-server-install --domain=testhdp.com \ --realm=TESTHDP.COM \ --hostname=ldap2.testhdp.com \ --setup-dns \ --forwarder=8.8.8.8 \ --reverse-zone=3.2.1.in-addr.arpa.&lt;/PRE&gt;&lt;P&gt;and the clients on each node as&lt;/P&gt;&lt;PRE&gt;ipa-client-install --domain=testhdp.com \
    --server=ldap2.testhdp.com \
    --realm=TESTHDP.COM \
    --principal=hadoopadmin@TESTHDP.COM\
    --enable-dns-updates&lt;/PRE&gt;&lt;P&gt;Also, that post doing the following step:&lt;/P&gt;&lt;PRE&gt;echo "nameserver ldap2.testhdp.com" &amp;gt; /etc/resolv.conf&lt;/PRE&gt;&lt;P&gt;my yum is broken and I need to revert to make it work.&lt;/P&gt;&lt;P&gt;Do you guys have any idea about it? I thought that there is no need of DNS as I have resolution of *.testhdp.com in my hostfile on all nodes.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 03:29:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kerberos-and-LDAP-integration/m-p/238376#M200187</guid>
      <dc:creator>rohan_goel</dc:creator>
      <dc:date>2018-12-11T03:29:30Z</dc:date>
    </item>
  </channel>
</rss>

