Reply
New Contributor
Posts: 2
Registered: ‎01-23-2019

Impyla kerberos based connection

Is there any examples available for impyla for how to connect to a kerberos cluster. the config in impala says ldap and I am not able to connect. Tried various combinations, various combinations of thrift/thrift-sasl versions and various versions of impyla as well.

But is there any documentation of examples available to look at what the connection properties are and if it works.

 

We have a kerborized cluster and it totally stops users from using it.

 

TTransportException: TTransportException(type=1, message="Could not start SASL: b'Error in sasl_client_start (-4) SASL(-4): no mechanism available: No worthy mechs found'")

This is the latest error where as all the options are available on the cluster.

 

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

Re: Impyla kerberos based connection

Can you share your code that connects to impala?

I had some examples here:
https://github.com/ericlin05/impyla-examples/blob/master/impala-kerberos.py

But it was a while back and I am not sure if it is still working with latest Impala.
New Contributor
Posts: 2
Registered: ‎01-23-2019

Re: Impyla kerberos based connection

from impala.dbapi import connect
from impala.util import as_pandas

conn = connect(host=kerurl, port=21050, auth_mechanism='GSSAPI')
cursor = conn.cursor()

 

This is the basic code we are trying, but the biggest challenge is kind of the old DLL hell, where there is not a right combination of the libraries..

impyla 14.1

thrift 0.3.0

thrift_sasl 0.11.0

gives different errors 

AttributeError: 'TSocket' object has no attribute 'isOpen'

Where as the 

impyla 13.8

thrift 0.2.1

thrift_sasl 0.9.3

gives 

TTransportException: TTransportException(type=1, message="Could not start SASL: b'Error in sasl_client_start (-4) SASL(-4): no mechanism available: No worthy mechs found'")

 

Where as all underlying mechanisms are available.

 

Do you know of a good combination?

New Contributor
Posts: 1
Registered: ‎04-24-2019

Re: Impyla kerberos based connection

Hi,

I have the same issue when connecting using:
* LDAP (username and password)
* SASL
* impyla

Can anyone help us to solve the issue?

Thanks

Rob