Created on 03-22-2020 09:24 PM - last edited on 03-22-2020 09:57 PM by ask_bill_brooks
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
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 ?
Created 03-22-2020 10:09 PM
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
Created 08-28-2021 09:58 AM
Hi @venkatsambath, I got the same problem too and I havent solved it, do you have any idea how to solve it. Yes my hiveserver2 is kerberized. I got rid of the error if I put LIMIT 300 to my query. But if it returns more than 300 rows then I got this error.
Created 08-28-2021 10:21 AM
It’s waste driver. Better switch to pyodbc and install the cloudera odbc driver. Which works like charm.
Created 08-28-2021 10:24 AM
Thanks for the quick reply and suggestion. Any documentation or article then I can go through for the setup and installation ?
Created 08-28-2021 10:31 AM
Created on 06-19-2020 12:30 AM - edited 06-19-2020 12:54 AM
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