python—尝试使用ibis连接到使用kerberos的impala服务器

avwztpqn  于 2021-06-26  发布在  Impala
关注(0)|答案(0)|浏览(345)

我正在尝试使用ibis.impala.connect连接到使用kerberos的impala服务器,如下所示:

import ibis

client = ibis.impala.connect(host='grid.company.corp',
                             port=21050,
                             auth_mechanism='GSSAPI',
                             use_ssl=True,
                             kerberos_service_name='impala',
                             ca_cert='D:\Users\USERNAME\Documents\cachain')

但我不断得到以下错误:

D:\Archivos de programa\Miniconda2\envs\anaconda\lib\site-packages\ibis\sql\postgres\compiler.py:175: UserWarning: locale specific date formats (%c, %x, %X) are not yet implemented for Windows
  'for %s' % platform.system()
Traceback (most recent call last):
  File "D:\Users\USERNAME\Documents\Jupyter Notebooks\PPCs\impyla.py", line 9, in <module>
    ca_cert='D:\Users\USERNAME\Documents\cachain')
  File "D:\Archivos de programa\Miniconda2\envs\anaconda\lib\site-packages\ibis\impala\api.py", line 97, in connect
    con = ImpalaConnection(pool_size=pool_size,**params)
  File "D:\Archivos de programa\Miniconda2\envs\anaconda\lib\site-packages\ibis\impala\client.py", line 87, in __init__
    self.ping()
  File "D:\Archivos de programa\Miniconda2\envs\anaconda\lib\site-packages\ibis\impala\client.py", line 182, in ping
    self._new_cursor()
  File "D:\Archivos de programa\Miniconda2\envs\anaconda\lib\site-packages\ibis\impala\client.py", line 167, in _new_cursor
    con = impyla.connect(database=self.database,**params)
  File "D:\Archivos de programa\Miniconda2\envs\anaconda\lib\site-packages\impala\dbapi.py", line 147, in connect
    auth_mechanism=auth_mechanism)
  File "D:\Archivos de programa\Miniconda2\envs\anaconda\lib\site-packages\impala\hiveserver2.py", line 658, in connect
    transport.open()
  File "build\bdist.win-amd64\egg\thrift_sasl\__init__.py", line 61, in open
  File "D:\Archivos de programa\Miniconda2\envs\anaconda\lib\site-packages\thrift\transport\TSSLSocket.py", line 120, in open
    self._validate_cert()
  File "D:\Archivos de programa\Miniconda2\envs\anaconda\lib\site-packages\thrift\transport\TSSLSocket.py", line 157, in _validate_cert
    'provided commonName "%s"' % (self.host, certhost))
thrift.transport.TTransport.TTransportException: Hostname we connected to "grid.company.corp" doesn't match certificate provided commonName "server.company.corp"

运行Windows7并使用anaconda安装Python2.7。
我有 Impala odbc设置,它工作良好。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题