Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error connecting to Kerberos using pyHive #464

Open
andret8 opened this issue Sep 28, 2023 · 0 comments
Open

Error connecting to Kerberos using pyHive #464

andret8 opened this issue Sep 28, 2023 · 0 comments

Comments

@andret8
Copy link

andret8 commented Sep 28, 2023

Hi,
I get this error while connecting to Hive via Kerberos:

thrift.transport.TTransport.TTransportException: Could not start SASL: b'Error in sasl_client_start (-1) SASL(-1): generic failure: GSSAPI Error: Unspecified GSS failure. Minor code may provide more information (Server krbtgt/LOCAL.IT@EXAMPLE.IT not found in Kerberos database)'

I am able to connect to Kerberos using "kinit -kt user user.keytab", and also via Hive ODBC driver. I use the same krb5.conf file, with Default Realm = EXAMPLE.IT.

With kinit, I obtain, correctly:

Default principal: user@EXAMPLE.IT
Valid starting Expires Service principal
09/28/23 11:05:16 09/28/23 11:05:16 krbtgt/EXAMPLE.IT@EXAMPLE.IT

The error is only using pyHive library. In the error, the library uses the domain LOCAL.IT instead of the one specified in krb5.conf, that is EXAMPLE.IT

My connection in pyHive:

conn = hive.Connection(host="host.domain.it",
                       port=10000,
                       auth="KERBEROS",
                       database="db_123",
                       kerberos_service_name="hive")

Note that LOCAL.IT is equal to domain.it.

Can you help me?
Thank you
Andrea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant