<?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: Fail to connect to keberosized hive via JDBC from windows in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Fail-to-connect-to-keberosized-hive-via-JDBC-from-windows/m-p/175580#M82908</link>
    <description>&lt;P&gt;We got this working. For those utilizing Horton works Timeserver with Kerosene, this is the thing that you have to do (giving you're Kerosene/present is substantial on your objective host.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.instantessay.co.uk/"&gt;top essay writing service&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Aug 2018 14:22:31 GMT</pubDate>
    <dc:creator>euricanaciara20</dc:creator>
    <dc:date>2018-08-30T14:22:31Z</dc:date>
    <item>
      <title>Fail to connect to keberosized hive via JDBC from windows</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Fail-to-connect-to-keberosized-hive-via-JDBC-from-windows/m-p/175579#M82907</link>
      <description>&lt;P&gt;
 Hi all,&lt;/P&gt;&lt;P&gt;
 I'd like to connect to hive with keberos enabled via JDBC from windows.  MIT is installed and ticket tis reterieved.&lt;/P&gt;&lt;P&gt;
 The smoke test java code is&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;public class HiveJDBC2 {
  private static String driverName = "org.apache.hive.jdbc.HiveDriver";
  public static void main(String[] args) throws SQLException, IOException, ClassNotFoundException {
    try {
      Class.forName(driverName);
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
      System.exit(1);
    }
    System.setProperty("java.security.auth.login.config", "gss-jaas.conf");
    System.setProperty("sun.security.jgss.debug", "true");
    System.setProperty("javax.security.auth.useSubjectCredsOnly", "false");
    System.setProperty("java.security.krb5.conf", "krb5.conf");
    Connection con = DriverManager.getConnection("jdbc:hive2://10.2.29.102:10000/default;principal=hive/lhq0363.abcd.com@ABCD.COM");
    System.out.println("Connected");
    con.close();
  }
}
&lt;/PRE&gt;&lt;P&gt;
 The error log is:&lt;/P&gt;&lt;PRE&gt;
 Search Subject for Kerberos V5 INIT cred (&amp;lt;&amp;lt;DEF&amp;gt;&amp;gt;, sun.security.jgss.krb5.Krb5InitCredential)
Debug is  true storeKey false useTicketCache true useKeyTab false doNotPrompt false ticketCache is null isInitiator true KeyTab is null refreshKrb5Config is false principal is hive/lhq0363.abcd.com@ABCD.COM tryFirstPass is false useFirstPass is false storePass is false clearPass is false
Acquire TGT from Cache
Principal is hive/lhq0363.abcd.com@ABCD.COM
Commit Succeeded 
Exception in thread "main" java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://10.2.29.102:10000/default;principal=hive/lhq0363.abcd.com@ABCD.COM: GSS initiate failed
 at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:218)
 at org.apache.hive.jdbc.HiveConnection.&amp;lt;init&amp;gt;(HiveConnection.java:156)
 at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
 at java.sql.DriverManager.getConnection(DriverManager.java:664)
 at java.sql.DriverManager.getConnection(DriverManager.java:270)
 at com.test.HiveJDBC2.main(HiveJDBC2.java:26)
Caused by: org.apache.thrift.transport.TTransportException: GSS initiate failed
 at org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:232)
 at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:316)
 at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
 at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:52)
 at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:49)
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.Subject.doAs(Subject.java:422)
 at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1866)
 at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport.open(TUGIAssumingTransport.java:49)
 at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:194)
 ... 5 more&lt;/PRE&gt;&lt;P&gt;
 I have searched quite a few threads but no luck. would someone give me any ideas?&lt;/P&gt;&lt;P&gt;
 &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="87435-kerberios.png" style="width: 645px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19777iFB1ED0DA9A74522C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="87435-kerberios.png" alt="87435-kerberios.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 13:39:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Fail-to-connect-to-keberosized-hive-via-JDBC-from-windows/m-p/175579#M82907</guid>
      <dc:creator>xpelive</dc:creator>
      <dc:date>2022-09-16T13:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Fail to connect to keberosized hive via JDBC from windows</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Fail-to-connect-to-keberosized-hive-via-JDBC-from-windows/m-p/175580#M82908</link>
      <description>&lt;P&gt;We got this working. For those utilizing Horton works Timeserver with Kerosene, this is the thing that you have to do (giving you're Kerosene/present is substantial on your objective host.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.instantessay.co.uk/"&gt;top essay writing service&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 14:22:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Fail-to-connect-to-keberosized-hive-via-JDBC-from-windows/m-p/175580#M82908</guid>
      <dc:creator>euricanaciara20</dc:creator>
      <dc:date>2018-08-30T14:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Fail to connect to keberosized hive via JDBC from windows</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Fail-to-connect-to-keberosized-hive-via-JDBC-from-windows/m-p/175581#M82909</link>
      <description>&lt;P&gt;The same program runs succefully on an edgenode with hive2 client.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 14:29:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Fail-to-connect-to-keberosized-hive-via-JDBC-from-windows/m-p/175581#M82909</guid>
      <dc:creator>xpelive</dc:creator>
      <dc:date>2018-08-30T14:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Fail to connect to keberosized hive via JDBC from windows</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Fail-to-connect-to-keberosized-hive-via-JDBC-from-windows/m-p/175582#M82910</link>
      <description>&lt;P&gt;thanks your hints @euricana .  it really caused by server time is 5 min earlier than host time&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 14:38:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Fail-to-connect-to-keberosized-hive-via-JDBC-from-windows/m-p/175582#M82910</guid>
      <dc:creator>xpelive</dc:creator>
      <dc:date>2018-08-30T14:38:48Z</dc:date>
    </item>
  </channel>
</rss>

