尝试通过 python 从我的 PC 连接到 hive(hue) 时出现 SASL 错误 - Windows10
SASL error when trying to connect to hive(hue) by python from my PC - Windows10
需要你的帮助!
我阅读了我在互联网上找到的所有文档(Whosebug、Github 等),但没有任何帮助。
我正在尝试通过 python 从我的 PC 连接到 hive(hue),我的脚本是:
当我 运行 此代码时,我收到此错误消息:
Traceback (most recent call last):
File "C:/Users/myuser/Documents/Python/testing.py", line 6, in <module>
cursor = hive.connect('myconnect', port=10000, username='root').cursor()
File "C:\Users\myuser\AppData\Local\Continuum\anaconda3\lib\site-packages\pyhive\hive.py", line 94,
in connect
return Connection(*args, **kwargs)
File "C:\Users\myuser\AppData\Local\Continuum\anaconda3\lib\site-packages\pyhive\hive.py", line
192, in __init__self._transport.open()File
"C:\Users\myuser\AppData\Local\Continuum\anaconda3\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: b'Error in sasl_client_start
(-4) SASL(-4): no mechanism available: Unable to find a callback: 2'
我的系统详细信息:
OS: Windows 10 临
Python 版本: Python 3.7.4
发行版:Win32 上的 Anaconda, Inc.
我找到了解决该问题的方法。
采取的行动:
- 在我的电脑上使用 Ubuntu OS 安装了 VirtualBox。
- 运行 Ubuntu 作为 root。
- 已安装 python、pip3 和相关库(pyhive、sasl、thrift_sasl 和 thrift)
- 运行 我的代码 - 效果很好!
我的结论是我的问题是由于安全(我不是我站的管理员)和 windows 问题引起的。
需要你的帮助!
我阅读了我在互联网上找到的所有文档(Whosebug、Github 等),但没有任何帮助。
我正在尝试通过 python 从我的 PC 连接到 hive(hue),我的脚本是:
当我 运行 此代码时,我收到此错误消息:
Traceback (most recent call last):
File "C:/Users/myuser/Documents/Python/testing.py", line 6, in <module>
cursor = hive.connect('myconnect', port=10000, username='root').cursor()
File "C:\Users\myuser\AppData\Local\Continuum\anaconda3\lib\site-packages\pyhive\hive.py", line 94,
in connect
return Connection(*args, **kwargs)
File "C:\Users\myuser\AppData\Local\Continuum\anaconda3\lib\site-packages\pyhive\hive.py", line
192, in __init__self._transport.open()File
"C:\Users\myuser\AppData\Local\Continuum\anaconda3\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: b'Error in sasl_client_start
(-4) SASL(-4): no mechanism available: Unable to find a callback: 2'
我的系统详细信息:
OS: Windows 10 临
Python 版本: Python 3.7.4
发行版:Win32 上的 Anaconda, Inc.
我找到了解决该问题的方法。
采取的行动:
- 在我的电脑上使用 Ubuntu OS 安装了 VirtualBox。
- 运行 Ubuntu 作为 root。
- 已安装 python、pip3 和相关库(pyhive、sasl、thrift_sasl 和 thrift)
- 运行 我的代码 - 效果很好!
我的结论是我的问题是由于安全(我不是我站的管理员)和 windows 问题引起的。