<?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: Spark-Hive Application: SASL Negotiation Failure with Kerberos on a Cluster in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Spark-Hive-Application-SASL-Negotiation-Failure-with/m-p/376121#M242775</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/78612"&gt;@RangaReddy&lt;/a&gt;&amp;nbsp; Thanks ,It was server level issue, I tried with different edge not and it worked,&lt;/P&gt;</description>
    <pubDate>Fri, 08 Sep 2023 02:39:26 GMT</pubDate>
    <dc:creator>Rohan44</dc:creator>
    <dc:date>2023-09-08T02:39:26Z</dc:date>
    <item>
      <title>Spark-Hive Application: SASL Negotiation Failure with Kerberos on a Cluster</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Spark-Hive-Application-SASL-Negotiation-Failure-with/m-p/374976#M242218</link>
      <description>&lt;DIV&gt;I'm having an issue with a Spark-Hive application running on a Kerberos cluster. I receive a javax.security.sasl.SaslException: GSS initiate failed error, which appears to be caused by not finding any Kerberos tgt.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Here's the error log:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 23/08/04 22:56:55 INFO HiveUtils: Initializing HiveMetastoreConnection version 1.2.1 using Spark classes.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 23/08/04 22:56:55 INFO HiveClientImpl: Attempting to login to Kerberos using principal: hdfs01@HDP.COM and keytab: hdfs01.keytab-2ca1f730-bef7-4166-90ce-67317c75c793&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 23/08/04 22:56:55 INFO UserGroupInformation: Login successful for user hdfs01@HDP.COM using keytab file hdfs01.keytab-2ca1f730-bef7-4166-90ce-67317c75c793&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 23/08/04 22:56:55 INFO metastore: Trying to connect to metastore with URI thrift://master3.abc.xyz.com:9083"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 23/08/04 22:56:55 ERROR TSaslTransport: SASL negotiation failure&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]&lt;/DIV&gt;&lt;DIV&gt;at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211)&lt;/DIV&gt;&lt;DIV&gt;at org.apac...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am submitting my Spark job as follows:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; spark-submit \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --name TestKerberous \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --num-executors 2 \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --driver-java-options "-Djava.security.auth.login.config=./key_fin.conf" \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --driver-java-options "-Dsun.security.krb5.debug=true" \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --conf "spark.executor.extraJavaOptions=-Djava.security.auth.login.config=./key_fin.conf"\&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --files=/etc/spark/conf/hive-site.xml,/etc/hadoop/conf/yarn-site.xml,/etc/hadoop/conf/hdfs-site.xml,/etc/hadoop/conf/core-site.xml \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --conf "spark.hadoop.hive.metastore.kerberos.principal=HTTP/_HOST@HDP.COM" \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --conf "spark.executor.extraJavaOptions=-Djava.security.auth.login.config=./key.conf" \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --conf -Djavax.security.auth.useSubjectCredsOnly=false \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --conf spark.executorEnv.KRB5_CONFIG=/etc/krb5.conf \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --conf spark.driverEnv.KRB5_CONFIG=/etc/krb5.conf \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --conf "spark.hadoop.hive.metastore.sasl.enabled=true" \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --conf "spark.hadoop.hive.security.authorization.enabled=true" \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --conf "spark.hadoop.hive.metastore.execute.setugi=true" \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --conf spark.sql.hive.convertMetastoreParquet=false \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --conf spark.home=/usr/hdp/current/spark2-client \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --conf spark.sql.warehouse.dir=/apps/hive/warehouse \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --conf spark.sql.catalogImplementation=hive \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --conf spark.yarn.keytab=/etc/security/keytabs/hdfs01.keytab \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --conf spark.yarn.principal=hdfs01@HDP.COM \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --conf spark.serializer=org.apache.spark.serializer.KryoSerializer &amp;nbsp;\&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --master yarn --deploy-mode cluster --driver-cores 2 --driver-memory 2G --executor-cores 2 --executor-memory 2G --supervise \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; --class &amp;lt;CLASS_NAME&amp;gt; \&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;lt;JAR_FILE&amp;gt;\&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; "&amp;lt;Hive Jdbc Url&amp;gt;" "thrift://master3.abc.xyz.com:9083" "/apps/hive/warehouse"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I would really appreciate it if anyone could help me diagnose what might be going wrong and how to resolve this issue.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you in advance for any insights you can provide&lt;/DIV&gt;</description>
      <pubDate>Sat, 05 Aug 2023 12:36:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Spark-Hive-Application-SASL-Negotiation-Failure-with/m-p/374976#M242218</guid>
      <dc:creator>Rohan44</dc:creator>
      <dc:date>2023-08-05T12:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Spark-Hive Application: SASL Negotiation Failure with Kerberos on a Cluster</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Spark-Hive-Application-SASL-Negotiation-Failure-with/m-p/375401#M242442</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/75577"&gt;@Rohan44&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please test the above application just by specifying keytab and principal and removing the other security related parameters in spark-submit?&lt;/P&gt;</description>
      <pubDate>Sun, 20 Aug 2023 16:03:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Spark-Hive-Application-SASL-Negotiation-Failure-with/m-p/375401#M242442</guid>
      <dc:creator>RangaReddy</dc:creator>
      <dc:date>2023-08-20T16:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Spark-Hive Application: SASL Negotiation Failure with Kerberos on a Cluster</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Spark-Hive-Application-SASL-Negotiation-Failure-with/m-p/376121#M242775</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/78612"&gt;@RangaReddy&lt;/a&gt;&amp;nbsp; Thanks ,It was server level issue, I tried with different edge not and it worked,&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 02:39:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Spark-Hive-Application-SASL-Negotiation-Failure-with/m-p/376121#M242775</guid>
      <dc:creator>Rohan44</dc:creator>
      <dc:date>2023-09-08T02:39:26Z</dc:date>
    </item>
  </channel>
</rss>

