<?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 Issue Generating principals in Cloudera Manager - 5.16.2 - Parcels. in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Issue-Generating-principals-in-Cloudera-Manager-5-16-2/m-p/306263#M222760</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When i try to 'Generate Missing Credentials' in Cloudera Manager:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;CM &amp;gt;Administration&amp;gt;Secuity&amp;gt;Kerberos Credentials , I get the following error&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;2020-11-20 00:13:31,793 INFO GenerateCredentials-0:com.cloudera.cmf.security.GenerateCredentialsCommand: Generating kerberos credentials using custom script /etc/hadoop/conf/keytabgen.sh&lt;BR /&gt;2020-11-20 00:13:31,794 INFO GenerateCredentials-0:com.cloudera.cmf.security.GenerateCredentialsCommand: Creating credentials for roleId 132&lt;BR /&gt;2020-11-20 00:13:31,794 INFO GenerateCredentials-0:com.cloudera.cmf.security.GenerateCredentialsCommand: Generating new keytab for spark/clouderadp02.ibm.cloud@IBM.CLOUD&lt;BR /&gt;2020-11-20 00:13:31,805 ERROR GenerateCredentials-0:com.cloudera.cmf.security.GenerateCredentialsCommand: unable to create credential for role 132 due to:/etc/hadoop/conf/keytabgen.sh failed with exit code 1 and output of &amp;lt;&amp;lt;&lt;BR /&gt;cp: cannot stat ‘/etc/hadoop/conf/keytabs/spark_clouderadp02.ibm.cloud@IBM.CLOUD.keytab’: No such file or directory&amp;gt;&amp;gt;&lt;BR /&gt;2020-11-20 00:13:36,926 ERROR CommandPusher:com.cloudera.cmf.command.CommandHelpers: GenerateCredentials - Execution error: &lt;BR /&gt;java.io.IOException: /etc/hadoop/conf/keytabgen.sh failed with exit code 1 and output of &amp;lt;&amp;lt;&lt;BR /&gt;cp: cannot stat ‘/etc/hadoop/conf/keytabs/spark_clouderadp02.ibm.cloud@IBM.CLOUD.keytab’: No such file or directory&amp;gt;&amp;gt;&lt;BR /&gt;	at com.cloudera.cmf.security.GenerateCredentialsCommand.generateKeytab(GenerateCredentialsCommand.java:404)&lt;BR /&gt;	at com.cloudera.cmf.security.GenerateCredentialsCommand.createKeytab(GenerateCredentialsCommand.java:501)&lt;BR /&gt;	at com.cloudera.cmf.security.GenerateCredentialsCommand.generateMissingKeytabs(GenerateCredentialsCommand.java:250)&lt;BR /&gt;	at com.cloudera.cmf.security.GenerateCredentialsCommand.access$300(GenerateCredentialsCommand.java:62)&lt;BR /&gt;	at com.cloudera.cmf.security.GenerateCredentialsCommand$2$1.run(GenerateCredentialsCommand.java:593)&lt;BR /&gt;	at com.cloudera.cmf.security.GenerateCredentialsCommand$2$1.run(GenerateCredentialsCommand.java:581)&lt;BR /&gt;	at com.cloudera.cmf.security.components.SecurityUtils.runWithGenerateKrb5Conf(SecurityUtils.java:375)&lt;BR /&gt;	at com.cloudera.cmf.security.GenerateCredentialsCommand$2.call(GenerateCredentialsCommand.java:581)&lt;BR /&gt;	at com.cloudera.cmf.security.GenerateCredentialsCommand$2.call(GenerateCredentialsCommand.java:577)&lt;BR /&gt;	at java.util.concurrent.FutureTask.run(FutureTask.java:266)&lt;BR /&gt;	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)&lt;BR /&gt;	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)&lt;BR /&gt;	at java.lang.Thread.run(Thread.java:748)&lt;BR /&gt;2020-11-20 00:13:36,927 INFO CommandPusher:com.cloudera.cmf.model.DbCommand: Command 2831(GenerateCredentials) has completed. finalstate:FINISHED, success:false, msg:/etc/hadoop/conf/keytabgen.sh failed with exit code 1 and output of &amp;lt;&amp;lt;&lt;BR /&gt;cp: cannot stat ‘/etc/hadoop/conf/keytabs/spark_clouderadp02.ibm.cloud@IBM.CLOUD.keytab’: No such file or directory&amp;gt;&amp;gt;&lt;/PRE&gt;
&lt;P&gt;Not sure what is causing this issue. The '/etc/hadoop/conf/keytabgen.sh' is a very simple script :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#!/bin/bash

# Cloudera Manager will input a destination path
DEST="$1"

# Cloudera Manager will input the principal name in the format: &amp;lt;service&amp;gt;/&amp;lt;fqdn&amp;gt;@REALM
PRINC="$2"

# Assuming the '&amp;lt;service&amp;gt;_&amp;lt;fqdn&amp;gt;@REALM.keytab' naming convention for keytab files
IN=$(echo $PRINC | sed -e 's/\//_/')
src="/etc/hadoop/conf/keytabs/${IN}.keytab"

# Copy the keytab to the destination input by Cloudera Manager
cp -v $SRC $DEST&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When i check in /etc/hadoop/conf/keytab path. I find that to be empty.&lt;/P&gt;
&lt;P&gt;When i check the principals in the KDC server(listprincs), I see the principals for each every service and user required.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure what is going wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;regards,&lt;/P&gt;
&lt;P&gt;Haree Krushnan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Nov 2020 07:34:30 GMT</pubDate>
    <dc:creator>HareeKrushnan</dc:creator>
    <dc:date>2020-11-20T07:34:30Z</dc:date>
    <item>
      <title>Issue Generating principals in Cloudera Manager - 5.16.2 - Parcels.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Issue-Generating-principals-in-Cloudera-Manager-5-16-2/m-p/306263#M222760</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When i try to 'Generate Missing Credentials' in Cloudera Manager:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;CM &amp;gt;Administration&amp;gt;Secuity&amp;gt;Kerberos Credentials , I get the following error&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;2020-11-20 00:13:31,793 INFO GenerateCredentials-0:com.cloudera.cmf.security.GenerateCredentialsCommand: Generating kerberos credentials using custom script /etc/hadoop/conf/keytabgen.sh&lt;BR /&gt;2020-11-20 00:13:31,794 INFO GenerateCredentials-0:com.cloudera.cmf.security.GenerateCredentialsCommand: Creating credentials for roleId 132&lt;BR /&gt;2020-11-20 00:13:31,794 INFO GenerateCredentials-0:com.cloudera.cmf.security.GenerateCredentialsCommand: Generating new keytab for spark/clouderadp02.ibm.cloud@IBM.CLOUD&lt;BR /&gt;2020-11-20 00:13:31,805 ERROR GenerateCredentials-0:com.cloudera.cmf.security.GenerateCredentialsCommand: unable to create credential for role 132 due to:/etc/hadoop/conf/keytabgen.sh failed with exit code 1 and output of &amp;lt;&amp;lt;&lt;BR /&gt;cp: cannot stat ‘/etc/hadoop/conf/keytabs/spark_clouderadp02.ibm.cloud@IBM.CLOUD.keytab’: No such file or directory&amp;gt;&amp;gt;&lt;BR /&gt;2020-11-20 00:13:36,926 ERROR CommandPusher:com.cloudera.cmf.command.CommandHelpers: GenerateCredentials - Execution error: &lt;BR /&gt;java.io.IOException: /etc/hadoop/conf/keytabgen.sh failed with exit code 1 and output of &amp;lt;&amp;lt;&lt;BR /&gt;cp: cannot stat ‘/etc/hadoop/conf/keytabs/spark_clouderadp02.ibm.cloud@IBM.CLOUD.keytab’: No such file or directory&amp;gt;&amp;gt;&lt;BR /&gt;	at com.cloudera.cmf.security.GenerateCredentialsCommand.generateKeytab(GenerateCredentialsCommand.java:404)&lt;BR /&gt;	at com.cloudera.cmf.security.GenerateCredentialsCommand.createKeytab(GenerateCredentialsCommand.java:501)&lt;BR /&gt;	at com.cloudera.cmf.security.GenerateCredentialsCommand.generateMissingKeytabs(GenerateCredentialsCommand.java:250)&lt;BR /&gt;	at com.cloudera.cmf.security.GenerateCredentialsCommand.access$300(GenerateCredentialsCommand.java:62)&lt;BR /&gt;	at com.cloudera.cmf.security.GenerateCredentialsCommand$2$1.run(GenerateCredentialsCommand.java:593)&lt;BR /&gt;	at com.cloudera.cmf.security.GenerateCredentialsCommand$2$1.run(GenerateCredentialsCommand.java:581)&lt;BR /&gt;	at com.cloudera.cmf.security.components.SecurityUtils.runWithGenerateKrb5Conf(SecurityUtils.java:375)&lt;BR /&gt;	at com.cloudera.cmf.security.GenerateCredentialsCommand$2.call(GenerateCredentialsCommand.java:581)&lt;BR /&gt;	at com.cloudera.cmf.security.GenerateCredentialsCommand$2.call(GenerateCredentialsCommand.java:577)&lt;BR /&gt;	at java.util.concurrent.FutureTask.run(FutureTask.java:266)&lt;BR /&gt;	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)&lt;BR /&gt;	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)&lt;BR /&gt;	at java.lang.Thread.run(Thread.java:748)&lt;BR /&gt;2020-11-20 00:13:36,927 INFO CommandPusher:com.cloudera.cmf.model.DbCommand: Command 2831(GenerateCredentials) has completed. finalstate:FINISHED, success:false, msg:/etc/hadoop/conf/keytabgen.sh failed with exit code 1 and output of &amp;lt;&amp;lt;&lt;BR /&gt;cp: cannot stat ‘/etc/hadoop/conf/keytabs/spark_clouderadp02.ibm.cloud@IBM.CLOUD.keytab’: No such file or directory&amp;gt;&amp;gt;&lt;/PRE&gt;
&lt;P&gt;Not sure what is causing this issue. The '/etc/hadoop/conf/keytabgen.sh' is a very simple script :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#!/bin/bash

# Cloudera Manager will input a destination path
DEST="$1"

# Cloudera Manager will input the principal name in the format: &amp;lt;service&amp;gt;/&amp;lt;fqdn&amp;gt;@REALM
PRINC="$2"

# Assuming the '&amp;lt;service&amp;gt;_&amp;lt;fqdn&amp;gt;@REALM.keytab' naming convention for keytab files
IN=$(echo $PRINC | sed -e 's/\//_/')
src="/etc/hadoop/conf/keytabs/${IN}.keytab"

# Copy the keytab to the destination input by Cloudera Manager
cp -v $SRC $DEST&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When i check in /etc/hadoop/conf/keytab path. I find that to be empty.&lt;/P&gt;
&lt;P&gt;When i check the principals in the KDC server(listprincs), I see the principals for each every service and user required.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure what is going wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;regards,&lt;/P&gt;
&lt;P&gt;Haree Krushnan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 07:34:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Issue-Generating-principals-in-Cloudera-Manager-5-16-2/m-p/306263#M222760</guid>
      <dc:creator>HareeKrushnan</dc:creator>
      <dc:date>2020-11-20T07:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Issue Generating principals in Cloudera Manager - 5.16.2 - Parcels.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Issue-Generating-principals-in-Cloudera-Manager-5-16-2/m-p/306265#M222762</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/30904"&gt;@HareeKrushnan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see that you are using a&amp;nbsp;&lt;SPAN&gt;custom script to retrieve keytabs from the local filesystem. The script is failing as it is unable to find the required keytabs at the location&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;cp: cannot stat ‘/etc/hadoop/conf/keytabs/spark_clouderadp02.ibm.cloud@IBM.CLOUD.keytab’: No such file or directory&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please note that to use the custom script the KDC administrators should create the required principals and keytabs, and store them securely on the Cloudera Manager Server host.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please review the below document for more information on using a Custom Kerberos Keytab Retrieval Script&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.cloudera.com/documentation/enterprise/5-16-x/topics/sg_keytab_retrieval_script.html" target="_blank"&gt;https://docs.cloudera.com/documentation/enterprise/5-16-x/topics/sg_keytab_retrieval_script.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let us know if this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P class="p1"&gt;&lt;I&gt;Was your question answered? Make sure to mark the answer as the accepted solution.&lt;/I&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;I&gt;If you find a reply useful, say thanks by clicking on the thumbs up button.&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 08:05:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Issue-Generating-principals-in-Cloudera-Manager-5-16-2/m-p/306265#M222762</guid>
      <dc:creator>tjangid</dc:creator>
      <dc:date>2020-11-20T08:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Issue Generating principals in Cloudera Manager - 5.16.2 - Parcels.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Issue-Generating-principals-in-Cloudera-Manager-5-16-2/m-p/306339#M222796</link>
      <description>&lt;P&gt;Hi Tjangid,&lt;/P&gt;&lt;P&gt;Thanks for the info, it indeed was the custom script which was causing the issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Haree Krushnan&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 05:25:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Issue-Generating-principals-in-Cloudera-Manager-5-16-2/m-p/306339#M222796</guid>
      <dc:creator>HareeKrushnan</dc:creator>
      <dc:date>2020-11-23T05:25:59Z</dc:date>
    </item>
  </channel>
</rss>

