cloudera / impyla

Python DB API 2.0 client for Impala and Hive (HiveServer2 protocol)
Apache License 2.0
731 stars 248 forks source link

puresasl.SASLError: None of the mechanisms listed meet all required properties #236

Closed ha62791 closed 7 years ago

ha62791 commented 7 years ago

I tried to connect to Impala on an instance of Kerberos-secured CDH cluster, but got below error: raise SASLError("None of the mechanisms listed meet all " puresasl.SASLError: None of the mechanisms listed meet all required properties

I have run kinit to get the Kerberos ticket before running my python script. kinit -kt <keytab file> <user>@<realm> In CDH Manager, it shows that the HiveServer2 port for Impala Daemon is 21050. In my script I connect like this: conn = connect(host='<host>', port=21050, database='<db>', auth_mechanism='GSSAPI')

I have also tried using LDAP as 21050 is also the port for Impala JDBC driver to connect to the Impala Daemon from outside the cluster. conn = connect(host='<host>', port=21050, database='<db>', auth_mechanism='LDAP', user='<user>', password='<pass>') user is same as the user in the kinit command, pass is same as the one used for JDBC and Hue login but still got the same error.

I am using:

ha62791 commented 7 years ago

I changed auth_mechanism to 'PLAIN' with user and password, and it works