6

I am getting the following error while trying to create a connection to HiveServer

 Traceback (most recent call last):
  File "/Users/user_name/Desktop/ABCo/EEM/EntityManagement/lodurr/data_lake/hive_db.py", line 56, in wrapper
    auth_mechanism='PLAIN')
  File "/Users/user_name/.virtualenvs/entity1/lib/python3.6/site-packages/impala/dbapi.py", line 147, in connect
    auth_mechanism=auth_mechanism)
  File "/Users/user_name/.virtualenvs/entity1/lib/python3.6/site-packages/impala/hiveserver2.py", line 758, in connect
    transport.open()
  File "/Users/user_name/.virtualenvs/entity1/lib/python3.6/site-packages/thrift_sasl/__init__.py", line 67, in open
    if not self._trans.isOpen():

These are the packages that I have installed when I do pip list

  • six (1.11.0)
  • thriftpy (0.3.9)
  • thrift-sasl (0.3.0)
  • sasl (0.2.1)
  • impyla (0.14.0)

I am using a macOS High Sierra as my development environment

jalanb
  • 1,097
  • 2
  • 11
  • 37
ameyrupji
  • 61
  • 1
  • 2

3 Answers3

4

I had the same issue and useed the following packages:

pip uninstall thrift-sasl
pip uninstall impyla
pip uninstall thrift

pip install thrift-sasl==0.2.1 
pip install thrift==0.9.3
pip install impyla==0.13.8
Rene B.
  • 6,557
  • 7
  • 46
  • 72
  • 1
    this caused `thriftpy.transport.TTransportException: TTransportException(type=4, message='TSocket read 0 bytes')` for me. – user9074332 Oct 20 '19 at 02:33
3

Not sure what the issue is but can you try with

thrift-sasl==0.2.1

1

This also got resolved by installing the latest versions of of Impyla (0.16.2) and thrift-sasl (0.4.2) using:

pip install --upgrade impyla
pip install --upgrade thrift-sasl
ebeb
  • 429
  • 3
  • 12