Python – Connect to Impala using an impyla client with Kerberos authentication

Connect to Impala using an impyla client with Kerberos authentication… here is a solution to the problem.

Connect to Impala using an impyla client with Kerberos authentication

I’m on a W8 machine and I’m using Python (Anaconda distribution) to connect to Impala in our Hadoop cluster, using the Impyla package. Our hadoop cluster is secured by Kerberos. I FOLLOWED < A HREF="http://docs.ibis-project.org/configuration.html#working-with-secure-clusters-kerberos" REL="NOREFERRER NOOPENER NOFOLLOW"> HOW TO CONFIGURE THE CONNECTION.

    from impala.dbapi import connect
    conn = connect( host='localhost', port=21050, auth_mechanism='GSSAPI',
               kerberos_service_name='impala')

We use Kerberos GSSAPI with SASL

auth_mechanism='GSSAPI'

I

HAVE INSTALLED THE PYTHON-SASL LIBRARY FOR WIN8 AND I STILL GET THIS ERROR.

Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no mechanism available: No worthy mechs found (code THRIFTTRANSPORT): TTransportException('Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no mechanism available: No worthy mechs found',)

I was

wondering if I was still missing some dependencies.

Solution

Install the kerberos Python package and it will solve your problem.

Related Problems and Solutions