Support Questions

Find answers, ask questions, and share your expertise

Impyla kerberos based connection

avatar
New Contributor

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.

 

6 REPLIES 6

avatar
Super Guru
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.

avatar
New Contributor

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?

avatar
New Contributor

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

avatar
New Contributor

We face the same problem on Windows OS. Which OS do you use?

avatar
Explorer

Having what appears to be exactly the same problem, on Windows 10 Enterprise.

 

impyla==0.15.0

thrift==0.11.0

thrift-sasl==0.3.0

 

But in thrift/transport/TSocket.py there absolutely is an isOpen() method. Not an attribute, but the way it is used in the code as pointed out by the error looks correct.

avatar
Explorer

Found this fix: https://github.com/cloudera/thrift_sasl/commit/d105152438ff78c2b1c041c79d1bcce25a760bb2

Unfortunately it throws other errors down the line. There seem to be a series of bugs in thrift_sasl.