<?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: Unexpected error condition executing the kadmin command. STDERR: kadmin: Matching credential not found in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Unexpected-error-condition-executing-the-kadmin-command/m-p/242297#M204100</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;ran into the same problem, but in my case the kadmin/&amp;lt;FQDN kadmin server&amp;gt;@&amp;lt;REALM&amp;gt;  existed and if i run &lt;/P&gt;&lt;PRE&gt;kinit -S kadmin/@&amp;lt;REALM&amp;gt; &lt;A rel="noopener noreferrer noopener noreferrer" href="mailto:admin/admin@EXAMPLE.COM" target="_blank"&gt;admin/admin@&amp;lt;REALM&amp;gt;&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;then he will authorize&lt;/P&gt;&lt;PRE&gt;# klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: admin/admin@&amp;lt;REALM&amp;gt;

Valid starting &amp;nbsp; &amp;nbsp; &amp;nbsp; Expires &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Service principal
08/07/2019 11:30:25 &amp;nbsp;08/07/2019 14:30:25 &amp;nbsp;kadmin/cluster@&amp;lt;REALM&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Aug 2019 20:41:45 GMT</pubDate>
    <dc:creator>demitov</dc:creator>
    <dc:date>2019-08-07T20:41:45Z</dc:date>
    <item>
      <title>Unexpected error condition executing the kadmin command. STDERR: kadmin: Matching credential not found</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unexpected-error-condition-executing-the-kadmin-command/m-p/242295#M204098</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I'm trying to kerberize the Ambari 2.7.3 cluster. However, during the setup, I get the following error:&lt;/P&gt;&lt;PRE&gt;Caused by: org.apache.ambari.server.serveraction.kerberos.KerberosOperationException: Unexpected error condition executing the kadmin command. STDERR: kadmin: Matching credential not found (filename: /tmp/ambari_krb_142308985016794830cc) while initializing kadmin interface
        at org.apache.ambari.server.serveraction.kerberos.MITKerberosOperationHandler.invokeKAdmin(MITKerberosOperationHandler.java:323)
        at org.apache.ambari.server.serveraction.kerberos.MITKerberosOperationHandler.principalExists(MITKerberosOperationHandler.java:123)
        at org.apache.ambari.server.serveraction.kerberos.KerberosOperationHandler.testAdministratorCredentials(KerberosOperationHandler.java:314)
        at org.apache.ambari.server.controller.KerberosHelperImpl.validateKDCCredentials(KerberosHelperImpl.java:2133)&lt;/PRE&gt;&lt;P&gt;All of the authentication settings are okay, because I am able to kinit and use the kadmin interface from shell.&lt;/P&gt;&lt;P&gt;It seems that the problem is that Ambari tries to do the following:&lt;/P&gt;&lt;PRE&gt;kinit -p admin/admin@EXAMPLE.COM
kadmin -c /tmp/ambari_krb_...&lt;/PRE&gt;&lt;P&gt;While it &lt;STRONG&gt;should be doing&lt;/STRONG&gt; the following:&lt;/P&gt;&lt;PRE&gt;kinit -S kadmin/admin@EXAMPLE.COM admin/admin@EXAMPLE.COM
kadmin -c /tmp/ambari_krb...&lt;/PRE&gt;&lt;P&gt;I've tried replicating the two settings and confirmed my guess. The second code works from the shell. Further, If I intercept the temporarily generated credentials by ambari with my own, the code works.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How can I fix this behaviour? This seem like a bug in Ambari code -- which part should I edit to fix this?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 19:16:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unexpected-error-condition-executing-the-kadmin-command/m-p/242295#M204098</guid>
      <dc:creator>mRabramS</dc:creator>
      <dc:date>2019-01-15T19:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected error condition executing the kadmin command. STDERR: kadmin: Matching credential not found</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unexpected-error-condition-executing-the-kadmin-command/m-p/242296#M204099</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/19219/saulius1122.html"&gt;@Javert Kirilov&lt;/A&gt; In Ambari 2.7.x, the MIT KDC connector logic uses the following kinit format:&lt;/P&gt;&lt;PRE&gt;kinit -S kadmin/&amp;lt;FQDN kadmin server&amp;gt;@EXAMPLE.COM admin/admin@EXAMPLE.COM&lt;/PRE&gt;&lt;P&gt;See &lt;A href="https://github.com/apache/ambari/blob/branch-2.7/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/MITKerberosOperationHandler.java#L336-L346" target="_blank"&gt;https://github.com/apache/ambari/blob/branch-2.7/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/MITKerberosOperationHandler.java#L336-L346&lt;/A&gt; for the code.&lt;/P&gt;&lt;P&gt;This is different then what you suggest since the server principal is basically hardcoded to kadmin/&amp;lt;FQDN kadmin server&amp;gt;@&amp;lt;REALM&amp;gt;. Since not all installations of the MIT KDC have this principal set up, this can cause issues like what you are seeing. In the newer release of Ambari, we have this fixed and the user can override the kadmin server principal. So until that version is release, it is suggested that you manually create that missing principal.&lt;/P&gt;&lt;P&gt;Hopefully you are willing to try this is see if it works for you.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 21:59:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unexpected-error-condition-executing-the-kadmin-command/m-p/242296#M204099</guid>
      <dc:creator>rlevas</dc:creator>
      <dc:date>2019-01-15T21:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected error condition executing the kadmin command. STDERR: kadmin: Matching credential not found</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unexpected-error-condition-executing-the-kadmin-command/m-p/242297#M204100</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;ran into the same problem, but in my case the kadmin/&amp;lt;FQDN kadmin server&amp;gt;@&amp;lt;REALM&amp;gt;  existed and if i run &lt;/P&gt;&lt;PRE&gt;kinit -S kadmin/@&amp;lt;REALM&amp;gt; &lt;A rel="noopener noreferrer noopener noreferrer" href="mailto:admin/admin@EXAMPLE.COM" target="_blank"&gt;admin/admin@&amp;lt;REALM&amp;gt;&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;then he will authorize&lt;/P&gt;&lt;PRE&gt;# klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: admin/admin@&amp;lt;REALM&amp;gt;

Valid starting &amp;nbsp; &amp;nbsp; &amp;nbsp; Expires &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Service principal
08/07/2019 11:30:25 &amp;nbsp;08/07/2019 14:30:25 &amp;nbsp;kadmin/cluster@&amp;lt;REALM&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 20:41:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unexpected-error-condition-executing-the-kadmin-command/m-p/242297#M204100</guid>
      <dc:creator>demitov</dc:creator>
      <dc:date>2019-08-07T20:41:45Z</dc:date>
    </item>
  </channel>
</rss>

