使用Pyhive连接hive时出错:thrift.transport.TTransport.TTransportException: Could not start SASL

在使用Pyhive连接Hive时遇到TTransportException错误,原因是缺少SASL机制。解决方案是通过yum安装cyrus-sasl-plain,安装后问题得到解决。
摘要由CSDN通过智能技术生成

安装Pyhive需要以下依赖:sasl==0.2.1、thrift==0.13.0、thrift-sasl==0.4.2

以上安装完成后,安装pyhive成功。

导入pyhive包,connection连接hive时,报以下错误:thrift.transport.TTransport.TTransportException: Could not start SASL: b'Error in sasl_client_start (-4) SASL(-4): no mechanism available: No worthy mechs found'

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/xindun/anaconda3/lib/python3.6/site-packages/pyhive/hive.py", line 192, in __init__
    self._transport.open()
  File "/home/xindun/anaconda3/lib/python3.6/site-packages/thrift_sasl/__init__.py", line 85, in open
    message=("Could not start SASL: %s" % self.sasl.getError()))
thrift.transport.TTransport.TTransportException: Could not start SASL: b'Error in sasl_client_start (-4) SASL(-4): no mechanism available: No worthy mechs found'
>>> conn = hive.Connectio
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值