Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/312.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python PyHive连接错误-无法启动SASL_Python_Hive_Sasl_Pyhive - Fatal编程技术网

Python PyHive连接错误-无法启动SASL

Python PyHive连接错误-无法启动SASL,python,hive,sasl,pyhive,Python,Hive,Sasl,Pyhive,我正在尝试使用PyHive连接到配置单元服务器。 到目前为止,我有: from pyhive import hive import pandas as pd # Create Hive connection conn = hive.Connection(host="*********", port=10000, auth='NONE') df = pd.read_sql("select max_temperature_f from `201402_weather

我正在尝试使用PyHive连接到配置单元服务器。 到目前为止,我有:

from pyhive import hive
import pandas as pd

# Create Hive connection
conn = hive.Connection(host="*********", port=10000, auth='NONE')

df = pd.read_sql("select max_temperature_f from `201402_weather_data` LIMIT 10", conn)
print(df.head())

<property>
<name>hive.server2.authentication</name>
<value>NONE</value>
<final>false</final>
<source>programmatically</source>
<source>org.apache.hadoop.hive.conf.LoopingByteArrayInputStream@56f71edb</source>
</property>

在我的hive-site.xml配置中,我有:

from pyhive import hive
import pandas as pd

# Create Hive connection
conn = hive.Connection(host="*********", port=10000, auth='NONE')

df = pd.read_sql("select max_temperature_f from `201402_weather_data` LIMIT 10", conn)
print(df.head())

<property>
<name>hive.server2.authentication</name>
<value>NONE</value>
<final>false</final>
<source>programmatically</source>
<source>org.apache.hadoop.hive.conf.LoopingByteArrayInputStream@56f71edb</source>
</property>


hive.server2.1身份验证
没有一个
假的
以编程方式
org.apache.hadoop.hive.conf。LoopingByteArrayInputStream@56f71edb


hive.server2.transport.mode
二元的
假的
以编程方式
org.apache.hadoop.hive.conf。LoopingByteArrayInputStream@56f71edb
据我所知,这些是我可以连接到配置单元服务器的正确设置(假设我不需要任何身份验证)。 执行脚本时出现错误:

Traceback (most recent call last):
  File "D:/****/hive_connector.py", line 8, in <module>
    auth='NONE')
  File "C:\Users\***\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyhive\hive.py", line 192, in __init__
    self._transport.open()
  File "C:\Users\***\AppData\Local\Programs\Python\Python37-32\lib\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: Unable to find a callback: 2'

回溯(最近一次呼叫最后一次):
文件“D://**/hive_connector.py”,第8行,在
auth='NONE')
文件“C:\Users\***\AppData\Local\Programs\Python\Python37-32\lib\site packages\pyhive\hive.py”,第192行,在u init中__
self.\u transport.open()
文件“C:\Users\***\AppData\Local\Programs\Python\Python37-32\lib\site packages\thrift\u sasl\\uuu init\uuu.py”,第85行,打开
消息=(“无法启动SASL:%s”%self.SASL.getError())
thrift.transport.ttTransport.ttTransportException:无法启动SASL:b'SASL_客户端_启动中出错(-4)SASL(-4):没有可用机制:找不到回调:2'
我使用的是windows,所以我必须手动下载并安装SASL-SASL-0.2.1-cp37-cp37m-win32.whl

我正在使用:

PyHive-0.6.3, sasl-0.2.1, 节俭-0.13.0, 节约sasl-0.4.2, thriftpy2-0.4.11(不确定从何而来)

我看到了很多问题,我尝试了一些方法,但我无法成功运行脚本。你能给我指出正确的解决办法吗?是sasl包导致了这些问题吗