How to solve the problem Could not start SASL: Error in sasl_client_start b (-12) SASL library is not initialized'?

Hello.
I have OS
windows Server 2008 R2
and
python
C:\Windows\system32>C:\Software\Python36\python --version
Python 3.6.4
installed libraries libs
future (0.16.0)
pip (9.0.1)
pure-sasl (0.4.0)
PyHive (0.5.0)
sasl (0.2.1)
setuptools (28.8.0)
six (1.11.0)
thrift (0.11.0)
thrift-sasl (0.3.0)

Tried to write a client for Hive DB

import pyhs2 as hive
import getpass
DEFAULT_DB = 'default'
DEFAULT_SERVER = 'hive_server'
DEFAULT_PORT = 10010
DEFAULT_DOMAIN = 'mydomain'

# u = raw_input('Enter your PAM username: ')
# s = getpass.getpass()
u="tech_user"
s="tech_passwd"
connection = hive.connect(host=DEFAULT_SERVER, port= DEFAULT_PORT, authMechanism='LDAP', user=u + '@' + DEFAULT_DOMAIN, password=s)


when I try to execute it returns an error:

File "C:\Software\Python36\lib\site-packages\pyhive\hive.py", line 159, in __init__
self._transport.open()
 File "C:\Software\Python36\lib\site-packages\thrift_sasl\__init__.py", line 79, in open
 message=("Could not start SASL: %s" % self.sasl.getError()))
thrift.transport.TTransport.TTransportException: Could not start SASL: Error in sasl_client_start b (-12) SASL library is not initialized'


How to solve this problem?
June 8th 19 at 16:58
0 answer

Find more questions by tags Python