<?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: Generate missing credential failed with constraint violation ERROR 19 in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Generate-missing-credential-failed-with-constraint-violation/m-p/381158#M244250</link>
    <description>&lt;P&gt;Welcome to the community&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/104916"&gt;@skylarblu4650&lt;/a&gt;.&amp;nbsp;As this post is a year old, I would suggest starting a new thread. That way you can provide details specific to your setup, version, how you encountered the issue and any steps you have tried already. It will provide others more details to assist you.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Dec 2023 13:12:10 GMT</pubDate>
    <dc:creator>cjervis</dc:creator>
    <dc:date>2023-12-22T13:12:10Z</dc:date>
    <item>
      <title>Generate missing credential failed with constraint violation ERROR 19</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Generate-missing-credential-failed-with-constraint-violation/m-p/358450#M237854</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are using AD for Kerberos. When we try to Generate missing credentials, we are getting error "ERROR GenerateCredentials-0:com.cloudera.cmf.security.GenerateCredentialsCommand: unable to create credential for role 785 due to:/opt/cloudera/cm/bin/gen_credentials_ad.sh failed with exit code 19 and output"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"SASL/GSSAPI authentication started&lt;BR /&gt;SASL username: user@domain&lt;BR /&gt;SASL SSF: 0&lt;BR /&gt;ldap_add: Constraint violation (19)&lt;BR /&gt;additional info: 000021C7: AtrErr: DSID-03200E7F, #1:&lt;BR /&gt;0: 000021C7: DSID-03200E7F, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 90303 (servicePrincipalName)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We got to know that there was a bug in Microsoft AD patch of November 2021 and Cloudera have a KB article with some suggestions to fix this. We have tried all of those options like disabling SPN on AD, Import Credentials with AD administration user account, removing from domain and generating missing credentials...but we get the same error every time. It tried to create HTTP principal everytime and fails to do so.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;anyone faced this error and have a solution? Can someone please help with this? Sharing the Microsoft bug article and Cloudera KB article below for reference. Also sharing the full error message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CLOUDERA:&lt;/P&gt;&lt;P&gt;&lt;A href="https://my.cloudera.com/knowledge/TSB-2021-544--Microsoft-AD-November-2021-Security-Update?id=334373" target="_blank"&gt;https://my.cloudera.com/knowledge/TSB-2021-544--Microsoft-AD-November-2021-Security-Update?id=334373&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.microsoft.com/en-us/topic/kb5008382-verification-of-uniqueness-for-user-principal-name-service-principal-name-and-the-service-principal-name-alias-cve-2021-42282-4651b175-290c-4e59-8fcb-e4e5cd0cdb29" target="_blank" rel="nofollow noopener noreferrer"&gt;https://support.microsoft.com/en-us/topic/kb5008382-verification-of-uniqueness-for-user-principal-name-service-principal-name-and-the-service-principal-name-alias-cve-2021-42282-4651b175-290c-4e59-8fcb-e4e5cd0cdb29&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR MSG:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/opt/cloudera/cm/bin/gen_credentials_ad.sh failed with exit code 19 and output of &amp;lt;&amp;lt;&lt;BR /&gt;+ export PATH=/usr/kerberos/bin:/usr/kerberos/sbin:/usr/lib/mit/sbin:/usr/sbin:/usr/lib/mit/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin&lt;BR /&gt;+ PATH=/usr/kerberos/bin:/usr/kerberos/sbin:/usr/lib/mit/sbin:/usr/sbin:/usr/lib/mit/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin&lt;BR /&gt;+ KEYTAB_OUT=/var/run/cloudera-scm-server/cmf8118737478853575492.keytab&lt;BR /&gt;+ PRINC=HTTP/hostname@domain&lt;BR /&gt;+ USER=cdhr_xxx&lt;BR /&gt;+ PASSWD=REDACTED&lt;BR /&gt;+ DELETE_ON_REGENERATE=true&lt;BR /&gt;+ SET_ENCRYPTION_TYPES=false&lt;BR /&gt;+ ENC_TYPES_MASK=4&lt;BR /&gt;+ USERACCOUNTCONTROL=45373&lt;BR /&gt;+ ACCOUNTEXPIRES=0&lt;BR /&gt;+ OBJECTCLASSES='objectClass: top&lt;BR /&gt;objectClass: person&lt;BR /&gt;objectClass: organizationalPerson&lt;BR /&gt;objectClass: user&lt;BR /&gt;'&lt;BR /&gt;+ DIST_NAME=CN=cdhr_xx,OU=xxx,OU=xxx,OU=xx,OU=xxx,DC=xxx,DC=xxx,DC=xxx&lt;BR /&gt;+ '[' -z /etc/krb5.conf ']'&lt;BR /&gt;+ echo 'Using custom config path '\''/etc/krb5.conf'\'', contents below:'&lt;BR /&gt;+ cat /etc/krb5.conf&lt;BR /&gt;+ SIMPLE_PWD_STR=&lt;BR /&gt;+ '[' '' = '' ']'&lt;BR /&gt;+ kinit -k -t /var/run/cloudera-scm-server/cmf369146187832524361.keytab user@domain&lt;BR /&gt;++ mktemp /tmp/cm_ldap.XXXXXXXX&lt;BR /&gt;+ LDAP_CONF=/tmp/cm_ldap.qKndHBEl&lt;BR /&gt;+ echo 'TLS_REQCERT never'&lt;BR /&gt;+ echo 'sasl_secprops minssf=0,maxssf=0'&lt;BR /&gt;+ export LDAPCONF=/tmp/cm_ldap.qKndHBEl&lt;BR /&gt;+ LDAPCONF=/tmp/cm_ldap.qKndHBEl&lt;BR /&gt;++ ldapsearch -LLL -H ldaps://hostname:636 -b OU=xxx,OU=xxx,OU=xx,OU=xxx,DC=xxx,DC=xxx,DC=xxx userPrincipalName=HTTP/hostname@domain&lt;BR /&gt;SASL/GSSAPI authentication started&lt;BR /&gt;SASL username: user@domain&lt;BR /&gt;SASL SSF: 0&lt;BR /&gt;+ PRINC_SEARCH=&lt;BR /&gt;++ echo ''&lt;BR /&gt;++ sed -n '1 {h; $ !d}; $ {x; s/\n //g; p}; /^ / {H; d}; /^ /! {x; s/\n //g; p}'&lt;BR /&gt;+ RESULTS_UNWRAPPED=&lt;BR /&gt;+ echo $'\342\200\234\342\200\235'&lt;BR /&gt;+ set +e&lt;BR /&gt;+ echo&lt;BR /&gt;+ grep -q userPrincipalName&lt;BR /&gt;+ '[' 1 -eq 0 ']'&lt;BR /&gt;+ set -e&lt;BR /&gt;+ '[' false = true ']'&lt;BR /&gt;+ ldapmodify -H ldaps://hostname:636&lt;BR /&gt;++ echo 'objectClass: top&lt;BR /&gt;objectClass: person&lt;BR /&gt;objectClass: organizationalPerson&lt;BR /&gt;objectClass: user&lt;BR /&gt;'&lt;BR /&gt;++ sed /str/d&lt;BR /&gt;++ echo HTTP/hostname@domain&lt;BR /&gt;++ sed -e 's/\@domain//g'&lt;BR /&gt;++ echo -n '"REDACTED"'&lt;BR /&gt;++ iconv -f UTF8 -t UTF16LE&lt;BR /&gt;++ base64 -w 0&lt;BR /&gt;SASL/GSSAPI authentication started&lt;BR /&gt;SASL username: user@domain&lt;BR /&gt;SASL SSF: 0&lt;BR /&gt;ldap_add: Constraint violation (19)&lt;BR /&gt;additional info: 000021C7: AtrErr: DSID-03200E7F, #1:&lt;BR /&gt;0: 000021C7: DSID-03200E7F, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 90303 (servicePrincipalName)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 14:47:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Generate-missing-credential-failed-with-constraint-violation/m-p/358450#M237854</guid>
      <dc:creator>Mohammed93</dc:creator>
      <dc:date>2022-11-28T14:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Generate missing credential failed with constraint violation ERROR 19</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Generate-missing-credential-failed-with-constraint-violation/m-p/358503#M237860</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/34362"&gt;@Mohammed93&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error generally happens if there is a duplicate&amp;nbsp;&lt;SPAN&gt;servicePrincipalName matching&amp;nbsp;HTTP/&amp;lt;hostname&amp;gt;@&amp;lt;REALM&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It could be possible that the duplicate entry could be in lowercase such as "http/&amp;lt;hostname&amp;gt;@&amp;lt;REALM&amp;gt; or may be with short hostname such as "HTTP/&amp;lt;short hostname&amp;gt;@&amp;lt;REALM&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please check with your AD admin to locate the duplicates and remove them. Then retry regeneration of Kerberos credentials.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 19:27:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Generate-missing-credential-failed-with-constraint-violation/m-p/358503#M237860</guid>
      <dc:creator>pajoshi</dc:creator>
      <dc:date>2022-11-28T19:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Generate missing credential failed with constraint violation ERROR 19</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Generate-missing-credential-failed-with-constraint-violation/m-p/358781#M237929</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/34362"&gt;@Mohammed93&lt;/a&gt;&amp;nbsp;Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 22:45:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Generate-missing-credential-failed-with-constraint-violation/m-p/358781#M237929</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2022-12-01T22:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Generate missing credential failed with constraint violation ERROR 19</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Generate-missing-credential-failed-with-constraint-violation/m-p/381140#M244242</link>
      <description>&lt;P&gt;I am facing the exact same error message as OP. In my case, the HTTP service principal was missing in cloudera manager, but I could find it in my active directory. after removing the http entries in active directory , i tried to generate missing credentials, but the same error appears.&lt;/P&gt;&lt;P&gt;Any advice would be appreciated&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/47030"&gt;@pajoshi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2023 09:22:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Generate-missing-credential-failed-with-constraint-violation/m-p/381140#M244242</guid>
      <dc:creator>skylarblu4650</dc:creator>
      <dc:date>2023-12-22T09:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Generate missing credential failed with constraint violation ERROR 19</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Generate-missing-credential-failed-with-constraint-violation/m-p/381158#M244250</link>
      <description>&lt;P&gt;Welcome to the community&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/104916"&gt;@skylarblu4650&lt;/a&gt;.&amp;nbsp;As this post is a year old, I would suggest starting a new thread. That way you can provide details specific to your setup, version, how you encountered the issue and any steps you have tried already. It will provide others more details to assist you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2023 13:12:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Generate-missing-credential-failed-with-constraint-violation/m-p/381158#M244250</guid>
      <dc:creator>cjervis</dc:creator>
      <dc:date>2023-12-22T13:12:10Z</dc:date>
    </item>
  </channel>
</rss>

