我正在尝试使用python2(miniconda2安装)连接到配置单元。下面是我正在尝试的代码-
connection = hive.connect(host='psvlxihpnn1', port= '10000', authMechanism='KERBEROS', user='***',password='****', configuration={'krb_host': 'psvlxihpnn1', 'krb_service': 'ITEDM'} )
kerberos主机安装在同一台主机上,并且服务名为“itedm”。奇怪的是,我得到下面的错误-
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/export/home/itedm/miniconda2/lib/python2.7/site-packages/pyhs2-0.6.0-py2.7.egg/pyhs2/__init__.py", line 7, in connect
File "/export/home/itedm/miniconda2/lib/python2.7/site-packages/pyhs2-0.6.0-py2.7.egg/pyhs2/connections.py", line 46, in __init__
File "/export/home/itedm/miniconda2/lib/python2.7/site-packages/pyhs2-0.6.0-py2.7.egg/pyhs2/cloudera/thrift_sasl.py", line 66, in open
thrift.transport.TTransport.TTransportException: Could not start SASL: Error in sasl_client_start (-1) SASL(-1): generic failure: GSSAPI Error: Unspecified GSS failure. Minor code may provide more information (Server krbtgt/INFORMATICA.COM@ITEDM not found in Kerberos database)
我不是以用户身份传递'krbtgt',不确定为什么会出现此错误。谢谢你的帮助。
1条答案
按热度按时间goqiplq21#
只要运行脚本的用户具有有效的kerberos票证,此连接字符串就可以工作:
用户名、密码和任何其他配置参数都不会通过kdc传递。