Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error - b'Error in sasl_client_start (-4) SASL(-4): no mechanism available: Unable to find a callback: 2'

I am trying to connect to HIVE via Python (Jupyter Notebooks). I have installed all the necessary packages for connecting HIVE using Python -

sasl                      0.2.1            py37h8a4fda4_1
thrift                    0.13.0                   pypi_0    pypi
thrift-sasl               0.3.0                    pypi_0    pypi
pyhive                    0.6.1                    pypi_0    pypi

from pyhive import hive
conn = hive.Connection(host="xxxxxxx", port=xxxxx, username="xxxxxxxx")

But unable to connect as it's throwing error: TTransportException: Could not start SASL: b'Error in sasl_client_start (-4) SASL(-4): no mechanism available: Unable to find a callback: 2'.

Am I missing anything? How do I connect?

like image 485
Vasudha Avatar asked Feb 04 '20 08:02

Vasudha


1 Answers

On the Windows platform, you need to add to win reestr the path to your C:\PyProj\MyProj\venv\Lib\site-packages\sasl\sasl2 directory. In the win command line: C:\Windows\system32>REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Carnegie Mellon\Project Cyrus\SASL Library" /v SearchPath /t REG_SZ /d "C:\PyProj\MyProj\venv\Lib\site-packages\sasl\sasl2"

like image 127
Sergey Tsukanov Avatar answered Nov 13 '22 06:11

Sergey Tsukanov