WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Error connecting to Kerberos using pyHive #464

@andret8

Description

@andret8

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/[email protected] 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: [email protected]
Valid starting Expires Service principal
09/28/23 11:05:16 09/28/23 11:05:16 krbtgt/[email protected]

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions