<?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: Error connecting to Kerberos using pyHive library in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Error-connecting-to-Kerberos-using-pyHive-library/m-p/377323#M243225</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/92357"&gt;@andrea_pretotto&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>Fri, 06 Oct 2023 23:40:28 GMT</pubDate>
    <dc:creator>DianaTorres</dc:creator>
    <dc:date>2023-10-06T23:40:28Z</dc:date>
    <item>
      <title>Error connecting to Kerberos using pyHive library</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Error-connecting-to-Kerberos-using-pyHive-library/m-p/377048#M243113</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;in a Unix environment, I get this error while connecting to Hive via Kerberos, using the library pyHive in a python script:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;thrift.transport.TTransport.TTransportException: Could not start SASL: b'Error in sasl_client_start (-1) SASL(-1): generic failure: GSSAPI Error: Unspecified GSS failure. Minor code may provide more information (Server krbtgt/&lt;A href="mailto:LOCAL.IT@EXAMPLE.IT" target="_blank" rel="noopener"&gt;LOCAL.IT@EXAMPLE.IT&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;not found in Kerberos database)'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I am able to connect to Kerberos using "kinit -kt user user.keytab", and also via Hive ODBC driver. I use the same krb5.conf file, with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Default Realm = EXAMPLE.IT&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;With kinit, I obtain, correctly:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Default principal:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:user@EXAMPLE.IT" target="_blank" rel="noopener"&gt;user@EXAMPLE.IT&lt;/A&gt;&lt;BR /&gt;Valid starting Expires Service principal&lt;BR /&gt;09/28/23 11:05:16 09/28/23 11:05:16&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:krbtgt/EXAMPLE.IT@EXAMPLE.IT" target="_blank" rel="noopener"&gt;krbtgt/EXAMPLE.IT@EXAMPLE.IT&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The error is only using pyHive library. In the error, the library uses the domain LOCAL.IT instead of the one specified in krb5.conf, that is EXAMPLE.IT&lt;/P&gt;&lt;P&gt;My connection in pyHive:&lt;/P&gt;&lt;DIV class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;PRE&gt;conn = hive.Connection(host="host.domain.it",
                       port=10000,
                       auth="KERBEROS",
                       database="db_123",
                       kerberos_service_name="hive")&lt;/PRE&gt;&lt;DIV class="zeroclipboard-container position-absolute right-0 top-0"&gt;&lt;STRONG&gt;Note that LOCAL.IT is equal to domain.it.&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Can you help me?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 14:14:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Error-connecting-to-Kerberos-using-pyHive-library/m-p/377048#M243113</guid>
      <dc:creator>andrea_pretotto</dc:creator>
      <dc:date>2023-09-29T14:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error connecting to Kerberos using pyHive library</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Error-connecting-to-Kerberos-using-pyHive-library/m-p/377052#M243115</link>
      <description>&lt;P&gt;PyHive is not maintained by Cloudera, Can you use Impyla to connect to HiveServer2? It should work with HS2 also.&lt;/P&gt;&lt;P&gt;Ref: &lt;A href="https://github.com/cloudera/impyla" target="_blank"&gt;https://github.com/cloudera/impyla&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 17:27:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Error-connecting-to-Kerberos-using-pyHive-library/m-p/377052#M243115</guid>
      <dc:creator>cravani</dc:creator>
      <dc:date>2023-09-29T17:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error connecting to Kerberos using pyHive library</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Error-connecting-to-Kerberos-using-pyHive-library/m-p/377117#M243134</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/92357"&gt;@andrea_pretotto&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additionally, you can also choose to use PyODBC:&lt;/P&gt;&lt;P&gt;&lt;A href="https://pypi.org/project/pyodbc/" target="_blank"&gt;https://pypi.org/project/pyodbc/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;together with the Cloudera Hive ODBC drivers:&lt;/P&gt;&lt;P&gt;&lt;A href="https://cloudera.com/downloads/connectors/hive/odbc" target="_blank"&gt;https://cloudera.com/downloads/connectors/hive/odbc&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should give the best compatibility with Hive.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;Miklos&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 08:56:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Error-connecting-to-Kerberos-using-pyHive-library/m-p/377117#M243134</guid>
      <dc:creator>mszurap</dc:creator>
      <dc:date>2023-10-02T08:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error connecting to Kerberos using pyHive library</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Error-connecting-to-Kerberos-using-pyHive-library/m-p/377142#M243151</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thank you for the answers.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/38161"&gt;@cravani&lt;/a&gt;&amp;nbsp;unfortunately Impala is not used. About pyODBC, &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/12885"&gt;@mszurap&lt;/a&gt;&amp;nbsp;, it sounds like the best option to adopt. We will work with this, and we will update you soon.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 16:23:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Error-connecting-to-Kerberos-using-pyHive-library/m-p/377142#M243151</guid>
      <dc:creator>andrea_pretotto</dc:creator>
      <dc:date>2023-10-02T16:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Error connecting to Kerberos using pyHive library</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Error-connecting-to-Kerberos-using-pyHive-library/m-p/377323#M243225</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/92357"&gt;@andrea_pretotto&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>Fri, 06 Oct 2023 23:40:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Error-connecting-to-Kerberos-using-pyHive-library/m-p/377323#M243225</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2023-10-06T23:40:28Z</dc:date>
    </item>
  </channel>
</rss>

