<?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 CDP connection with Python/Thrift failing in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/CDP-connection-with-Python-Thrift-failing/m-p/324440#M229368</link>
    <description>&lt;P&gt;We are migrating from Hortonworks (HDP) to Cloudera (CDP) and having difficulties connecting to the hbase.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The following code works when using a HDP host:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from thrift.transport import TSocket, TTransport, THttpClient
from thrift.transport.TSSLSocket import TSSLSocket
from thrift.protocol import TBinaryProtocol, TCompactProtocol
import app.hbased.Hbase as Hbase

host = "hdp.mycompany.com"
port = 9090

sock = TSocket.TSocket(host, port)
saslServiceName = "hbase"
transport = TTransport.TSaslClientTransport(sock, host, saslServiceName, mechanism="GSSAPI")
protocol = TBinaryProtocol.TBinaryProtocol(transport)
client = Hbase.Client(protocol)
transport.open()

table_names = client.getTableNames()
print table_names&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when changing the host to a CDP server:&lt;/P&gt;&lt;P&gt;host = "cdp.mycompany.com"&lt;BR /&gt;we get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "C:\Users\myuser\apps\app\test\test.py", line 20, in &amp;lt;module&amp;gt;&lt;BR /&gt;table_names = client.getTableNames()&lt;BR /&gt;File "C:\Users\myuser\apps\app\hbased\Hbase.py", line 787, in getTableNames&lt;BR /&gt;self.send_getTableNames()&lt;BR /&gt;File "C:\Users\myuser\apps\app\hbased\Hbase.py", line 795, in send_getTableNames&lt;BR /&gt;self._oprot.trans.flush()&lt;BR /&gt;File "C:\ProgramData\Anaconda3\envs\ts27\lib\site-packages\thrift\transport\TTransport.py", line 418, in flush&lt;BR /&gt;encoded = self.sasl.wrap(data)&lt;BR /&gt;File "C:\ProgramData\Anaconda3\envs\ts27\lib\site-packages\puresasl\client.py", line 16, in wrapped&lt;BR /&gt;return f(self, *args, **kwargs)&lt;BR /&gt;File "C:\ProgramData\Anaconda3\envs\ts27\lib\site-packages\puresasl\client.py", line 157, in wrap&lt;BR /&gt;return self._chosen_mech.wrap(outgoing)&lt;BR /&gt;File "C:\ProgramData\Anaconda3\envs\ts27\lib\site-packages\puresasl\mechanisms.py", line 532, in wrap&lt;BR /&gt;kerberos.authGSSClientWrap(self.context, outgoing, None, protect)&lt;BR /&gt;winkerberos.GSSError: SSPI: EncryptMessage: The function requested is not supported&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Environment info:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;python 2.7&lt;BR /&gt;thrift 0.11.0&lt;BR /&gt;pure-sasl 0.5.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on how to fix this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Tue, 21 Apr 2026 08:58:11 GMT</pubDate>
    <dc:creator>Clua</dc:creator>
    <dc:date>2026-04-21T08:58:11Z</dc:date>
    <item>
      <title>CDP connection with Python/Thrift failing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/CDP-connection-with-Python-Thrift-failing/m-p/324440#M229368</link>
      <description>&lt;P&gt;We are migrating from Hortonworks (HDP) to Cloudera (CDP) and having difficulties connecting to the hbase.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The following code works when using a HDP host:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from thrift.transport import TSocket, TTransport, THttpClient
from thrift.transport.TSSLSocket import TSSLSocket
from thrift.protocol import TBinaryProtocol, TCompactProtocol
import app.hbased.Hbase as Hbase

host = "hdp.mycompany.com"
port = 9090

sock = TSocket.TSocket(host, port)
saslServiceName = "hbase"
transport = TTransport.TSaslClientTransport(sock, host, saslServiceName, mechanism="GSSAPI")
protocol = TBinaryProtocol.TBinaryProtocol(transport)
client = Hbase.Client(protocol)
transport.open()

table_names = client.getTableNames()
print table_names&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when changing the host to a CDP server:&lt;/P&gt;&lt;P&gt;host = "cdp.mycompany.com"&lt;BR /&gt;we get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "C:\Users\myuser\apps\app\test\test.py", line 20, in &amp;lt;module&amp;gt;&lt;BR /&gt;table_names = client.getTableNames()&lt;BR /&gt;File "C:\Users\myuser\apps\app\hbased\Hbase.py", line 787, in getTableNames&lt;BR /&gt;self.send_getTableNames()&lt;BR /&gt;File "C:\Users\myuser\apps\app\hbased\Hbase.py", line 795, in send_getTableNames&lt;BR /&gt;self._oprot.trans.flush()&lt;BR /&gt;File "C:\ProgramData\Anaconda3\envs\ts27\lib\site-packages\thrift\transport\TTransport.py", line 418, in flush&lt;BR /&gt;encoded = self.sasl.wrap(data)&lt;BR /&gt;File "C:\ProgramData\Anaconda3\envs\ts27\lib\site-packages\puresasl\client.py", line 16, in wrapped&lt;BR /&gt;return f(self, *args, **kwargs)&lt;BR /&gt;File "C:\ProgramData\Anaconda3\envs\ts27\lib\site-packages\puresasl\client.py", line 157, in wrap&lt;BR /&gt;return self._chosen_mech.wrap(outgoing)&lt;BR /&gt;File "C:\ProgramData\Anaconda3\envs\ts27\lib\site-packages\puresasl\mechanisms.py", line 532, in wrap&lt;BR /&gt;kerberos.authGSSClientWrap(self.context, outgoing, None, protect)&lt;BR /&gt;winkerberos.GSSError: SSPI: EncryptMessage: The function requested is not supported&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Environment info:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;python 2.7&lt;BR /&gt;thrift 0.11.0&lt;BR /&gt;pure-sasl 0.5.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on how to fix this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 08:58:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/CDP-connection-with-Python-Thrift-failing/m-p/324440#M229368</guid>
      <dc:creator>Clua</dc:creator>
      <dc:date>2026-04-21T08:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: CDP connection with Python/Thrift failing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/CDP-connection-with-Python-Thrift-failing/m-p/325178#M229548</link>
      <description>&lt;P&gt;I fixed the issue by using gssflags in the authGSSClientInit method in my pure_sasl mechanisms.py&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 15:10:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/CDP-connection-with-Python-Thrift-failing/m-p/325178#M229548</guid>
      <dc:creator>Clua</dc:creator>
      <dc:date>2021-09-23T15:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: CDP connection with Python/Thrift failing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/CDP-connection-with-Python-Thrift-failing/m-p/325267#M229582</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/91435"&gt;@Clua&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Looks like you solved it, if possible could you please share the code snippets how you added&amp;nbsp;&lt;SPAN&gt;gssflags in the authGSSClientInit and which Transport function are you using.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;BR /&gt;Will&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Sep 2021 05:09:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/CDP-connection-with-Python-Thrift-failing/m-p/325267#M229582</guid>
      <dc:creator>willx</dc:creator>
      <dc:date>2021-09-25T05:09:35Z</dc:date>
    </item>
  </channel>
</rss>

