尝试使用ibis连接到使用kerberos的Impala服务器

时间:2016-09-19 21:24:19

标签: python hdfs impala ibis

我正在尝试使用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"

使用Anaconda运行安装了python 2.7的Windows 7。

我已经设置了Impala ODBC,它运行正常。

0 个答案:

没有答案