PyHive icon indicating copy to clipboard operation
PyHive copied to clipboard

Connection Error(TTransportException) to Hive using SQLAlchemy API

Open onlyjiny opened this issue 3 years ago • 0 comments

Hi.

I am trying to connect Hive server using PyHive and SQLAlchemy API with SASL as below code:

ssl_args = {'ssl_cert': 'cacerts.pem'} engine = create_engine("hive://username:[email protected]:10000/default?auth=LDAP", connect_args=ssl_args) insp = inspect(engine)

But it makes error like below:

thrift.transport.TTransport.TTransportExceptiojn: Could not start SASL; b'Error in sasl_client_start (-4) SASL(-4): no mechanism avaliable: No worthy mechs found'

I tested it on Python 3.6.8 and two virtual environments.

first venv: SQLAlchemy==1.4.35, PyHive==0.6.5, sasl==0.2.1, thrift==0.10.0, thrift-sasl==0.3.0 second venv: SQLAlchemy==1.4.35, PyHive==0.6.5, sasl==0.3.1, thrift==0.16.0, thrift-sasl==0.4.3

Could you please let me know how to fix this issue?

onlyjiny avatar Apr 25 '22 01:04 onlyjiny