Reply
New Contributor
Posts: 3
Registered: ‎09-30-2016

Trying to connect to Impala server that uses kerberos using the ibis package.

I'm trying to connect to Impala server that uses kerberos using the ibis.impala.connect like so:

 

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')

 

But I keep getting the following error:

 

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"

 

Running Windows 7 with python 2.7 installed using Anaconda.

I have the Impala ODBC set up and it works fine.

Cloudera Employee
Posts: 211
Registered: ‎03-23-2015

Re: Trying to connect to Impala server that uses kerberos using the ibis package.

Hi

 

The error message indicated that the certificate provided is not correct:

 

Hostname we connected to "grid.company.corp" doesn't match certificate provided commonName "server.company.corp"

 

Please doubt check that first.

New Contributor
Posts: 3
Registered: ‎09-30-2016

Re: Trying to connect to Impala server that uses kerberos using the ibis package.

Hey EricL thanks for your reply,

 

I asked our IT team for a new certififcate and got the same error, whats weird is that I can connect using the Impala ODBC driver with the same certififcate that I'm using for the ibis conection.

 

The ODBC configuration is:

 

Cloudera Employee
Posts: 211
Registered: ‎03-23-2015

Re: Trying to connect to Impala server that uses kerberos using the ibis package.

Hi,

 

Can you confirm that you do not have load balancer for impala? I can't think of any other reasons that might have caused this.

New Contributor
Posts: 3
Registered: ‎09-30-2016

Re: Trying to connect to Impala server that uses kerberos using the ibis package.

Yes it does have a load balancer which is the one called grid.company.corp
Highlighted
New Contributor
Posts: 3
Registered: ‎04-12-2017

Re: Trying to connect to Impala server that uses kerberos using the ibis package.

Did you happen to find a solution for this??

Thanks in advance

Announcements