<?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: GSS initiate failed (state=08S01,code=0) (Kerberos, HIve, HDP 3.0.1) in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/GSS-initiate-failed-state-08S01-code-0-Kerberos-HIve-HDP-3-0/m-p/235203#M197023</link>
    <description>&lt;P&gt;Hi Jeremey,&lt;/P&gt;&lt;P&gt;Sorry I can't check your advice due we disable a Kerberos.&lt;/P&gt;&lt;P&gt;In any way, thank you for your answer!&lt;/P&gt;</description>
    <pubDate>Wed, 05 Dec 2018 13:01:21 GMT</pubDate>
    <dc:creator>kubalievzh</dc:creator>
    <dc:date>2018-12-05T13:01:21Z</dc:date>
    <item>
      <title>GSS initiate failed (state=08S01,code=0) (Kerberos, HIve, HDP 3.0.1)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/GSS-initiate-failed-state-08S01-code-0-Kerberos-HIve-HDP-3-0/m-p/235201#M197021</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;after enabled Kerberos on fresh HDP v3.0.1, we can't get access to Hive.&lt;/P&gt;&lt;P&gt;Before Kerberos we just enter 'sudo su - hive', and get access to hive by the 'hive' command.&lt;/P&gt;&lt;P&gt;After Kerberos, when we enter `hive` command we getting the following error:&lt;/P&gt;&lt;PRE&gt;[hive@host1 ~]$ hive
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/3.0.1.0-187/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/3.0.1.0-187/hadoop/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See &lt;A href="http://www.slf4j.org/codes.html#multiple_bindings" target="_blank"&gt;http://www.slf4j.org/codes.html#multiple_bindings&lt;/A&gt; for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Connecting to jdbc:hive2://host1.xxx.local:2181,kz-name03.xxx.local:2181,kz-name04.xxx.local:2181/default;principal=hive/_HOST@xxx.LOCAL;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
18/11/01 17:22:53 [main]: ERROR transport.TSaslTransport: SASL negotiation failure
javax.security.sasl.SaslException: GSS initiate failed
        at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211) ~[?:1.8.0_112]
        at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94) ~[hive-exec-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271) [hive-exec-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) [hive-exec-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:51) [hive-exec-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:48) [hive-exec-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_112]
        at javax.security.auth.Subject.doAs(Subject.java:422) [?:1.8.0_112]
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730) [hadoop-common-3.1.1.3.0.1.0-187.jar:?]
        at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport.open(TUGIAssumingTransport.java:48) [hive-exec-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:339) [hive-jdbc-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.hive.jdbc.HiveConnection.&amp;lt;init&amp;gt;(HiveConnection.java:224) [hive-jdbc-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) [hive-jdbc-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at java.sql.DriverManager.getConnection(DriverManager.java:664) [?:1.8.0_112]
        at java.sql.DriverManager.getConnection(DriverManager.java:208) [?:1.8.0_112]
        at org.apache.hive.beeline.DatabaseConnection.connect(DatabaseConnection.java:145) [hive-beeline-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.hive.beeline.DatabaseConnection.getConnection(DatabaseConnection.java:209) [hive-beeline-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.hive.beeline.Commands.connect(Commands.java:1641) [hive-beeline-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.hive.beeline.Commands.connect(Commands.java:1536) [hive-beeline-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_112]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
        at org.apache.hive.beeline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:56) [hive-beeline-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.hive.beeline.BeeLine.execCommandWithPrefix(BeeLine.java:1384) [hive-beeline-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1423) [hive-beeline-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.hive.beeline.BeeLine.defaultBeelineConnect(BeeLine.java:1091) [hive-beeline-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.hive.beeline.BeeLine.initArgs(BeeLine.java:800) [hive-beeline-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:1048) [hive-beeline-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:538) [hive-beeline-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at org.apache.hive.beeline.BeeLine.main(BeeLine.java:520) [hive-beeline-3.1.0.3.0.1.0-187.jar:3.1.0.3.0.1.0-187]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_112]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
        at org.apache.hadoop.util.RunJar.run(RunJar.java:318) [hadoop-common-3.1.1.3.0.1.0-187.jar:?]
        at org.apache.hadoop.util.RunJar.main(RunJar.java:232) [hadoop-common-3.1.1.3.0.1.0-187.jar:?]
Caused by: org.ietf.jgss.GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
        at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:147) ~[?:1.8.0_112]
        at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:122) ~[?:1.8.0_112]
        at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:187) ~[?:1.8.0_112]
        at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:224) ~[?:1.8.0_112]
        at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212) ~[?:1.8.0_112]
        at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179) ~[?:1.8.0_112]
        at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192) ~[?:1.8.0_112]
        ... 36 more
18/11/01 17:22:53 [main]: WARN jdbc.HiveConnection: Failed to connect to host1.xxx.local:10000
18/11/01 17:22:53 [main]: ERROR jdbc.Utils: Unable to read HiveServer2 configs from ZooKeeper
Unknown HS2 problem when communicating with Thrift server.
Error: Could not open client transport for any of the Server URI's in ZooKeeper: GSS initiate failed (state=08S01,code=0)
Beeline version 3.1.0.3.0.1.0-187 by Apache Hive
&lt;/PRE&gt;&lt;P&gt;We have tried to follow the instruction given in the &lt;A href="https://community.hortonworks.com/articles/75514/beeline-with-kerberos-and-servicediscorerymode-not.html"&gt;link&lt;/A&gt; but no success. kinit work fine!&lt;/P&gt;&lt;P&gt;If above text hard to read let me provide short Errors' descriptions.&lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;18/11/01 17:22:53 [main]: &lt;STRONG&gt;ERROR&lt;/STRONG&gt; transport.TSaslTransport: SASL negotiation failure javax.security.sasl.SaslException: GSS initiate failed&lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;18/11/01 17:22:53 [main]: WARN jdbc.HiveConnection: Failed to connect to host1.xxx.local:10000
18/11/01 17:22:53 [main]: &lt;STRONG&gt;ERROR&lt;/STRONG&gt; jdbc.Utils: Unable to read HiveServer2 configs from ZooKeeper Unknown HS2 problem when communicating with Thrift server.
Error: Could not open client transport for any of the Server URI's in ZooKeeper: &lt;STRONG&gt;GSS initiate failed (state=08S01,code=0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Please help!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 10:55:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/GSS-initiate-failed-state-08S01-code-0-Kerberos-HIve-HDP-3-0/m-p/235201#M197021</guid>
      <dc:creator>kubalievzh</dc:creator>
      <dc:date>2018-11-02T10:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: GSS initiate failed (state=08S01,code=0) (Kerberos, HIve, HDP 3.0.1)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/GSS-initiate-failed-state-08S01-code-0-Kerberos-HIve-HDP-3-0/m-p/235202#M197022</link>
      <description>&lt;P&gt;I had the exact same problem and solve it this way:&lt;/P&gt;&lt;P&gt;First get a kerberos ticket on the machine with hiveserver then start hive:&lt;/P&gt;&lt;PRE&gt;sudo kinit -kt /etc/security/keytabs/hive.service.keytab hive/host1.xxx.local@EXAMPLE:COM&lt;/PRE&gt;
&lt;PRE&gt;sudo beeline -u "jdbc:hive2://host1.xxx.local:2181,host2.xxx.local:2181,host3.xxx.local:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2"&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Dec 2018 22:03:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/GSS-initiate-failed-state-08S01-code-0-Kerberos-HIve-HDP-3-0/m-p/235202#M197022</guid>
      <dc:creator>jeremyjjea</dc:creator>
      <dc:date>2018-12-04T22:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: GSS initiate failed (state=08S01,code=0) (Kerberos, HIve, HDP 3.0.1)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/GSS-initiate-failed-state-08S01-code-0-Kerberos-HIve-HDP-3-0/m-p/235203#M197023</link>
      <description>&lt;P&gt;Hi Jeremey,&lt;/P&gt;&lt;P&gt;Sorry I can't check your advice due we disable a Kerberos.&lt;/P&gt;&lt;P&gt;In any way, thank you for your answer!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 13:01:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/GSS-initiate-failed-state-08S01-code-0-Kerberos-HIve-HDP-3-0/m-p/235203#M197023</guid>
      <dc:creator>kubalievzh</dc:creator>
      <dc:date>2018-12-05T13:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: GSS initiate failed (state=08S01,code=0) (Kerberos, HIve, HDP 3.0.1)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/GSS-initiate-failed-state-08S01-code-0-Kerberos-HIve-HDP-3-0/m-p/312883#M225306</link>
      <description>&lt;P&gt;This may be an old post but helped me a lot at this time. Just wanted to say THANK YOU!!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;davidl&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 17:04:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/GSS-initiate-failed-state-08S01-code-0-Kerberos-HIve-HDP-3-0/m-p/312883#M225306</guid>
      <dc:creator>davidl</dc:creator>
      <dc:date>2021-03-11T17:04:24Z</dc:date>
    </item>
  </channel>
</rss>

