Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

PyHive : thrift.transport.TTransport.TTransportException: 'Error in sasl_decode (-1) SASL(-1): generic failure: Unable to find a callback: 32775'

Highlighted

PyHive : thrift.transport.TTransport.TTransportException: 'Error in sasl_decode (-1) SASL(-1): generic failure: Unable to find a callback: 32775'

Explorer

I've create a Python script for connect to Hiveserver2 to perform queries databases.

My code are working fine, it's running for a while until the error came out.

 

 

thrift.transport.TTransport.TTransportException: 'Error in sasl_decode (-1) SASL(-1): generic failure: Unable to find a callback: 32775'

 

 

From investigated, I guess it might be something about Thrift SASL library 

https://github.com/cloudera/thrift_sasl/blob/master/thrift_sasl/__init__.py

 

 

  def _read_frame(self):
    header = self._trans.read(4)
    (length,) = struct.unpack(">I", header)
    if self.encode:
      # If the frames are encoded (i.e. you're using a QOP of auth-int or
      # auth-conf), then make sure to include the header in the bytes you send to
      # sasl.decode()
      encoded = header + self._trans.read(length)
      success, decoded = self.sasl.decode(encoded)
      if not success:
        raise TTransportException(type=TTransportException.UNKNOWN,
                                  message=self.sasl.getError())

 

 

I have no idea what's cause the exception occurred. Any suggestion would be nice!

How to fix this problem ?

Thanks

2 REPLIES 2
Highlighted

Re: PyHive : thrift.transport.TTransport.TTransportException: 'Error in sasl_decode (-1) SASL(-1): generic failure: Unable to find a callback: 32775'

Expert Contributor

This error usually happens if the client doesnt match the QOP on server.

 

Can you share the connection string used in your code snippet? Is your hiveserver2 kerberised? Can you please share what is the value set for this property hive.server2.thrift.sasl.qop in your hiveserver2's hive-site.xml?

 

Example connection string is in link https://github.com/dropbox/PyHive/pull/135/files/ec5270c4b6556bcd20f0f81afbced4a69ca9eff0

Re: PyHive : thrift.transport.TTransport.TTransportException: 'Error in sasl_decode (-1) SASL(-1): generic failure: Unable to find a callback: 32775'

New Contributor

Did you find solution for this?

I am facing the same issue. My hiveserver2 is kerberized and 

hive.server2.thrift.sasl.qop - auth-conf

hive.server2.transport.mode - binary

 

it's working If i limit rows to  less than1000 . It I set to more than 1000 rows . It's failing

 
 
Don't have an account?
Coming from Hortonworks? Activate your account here