python ODBC kerberos Error

This is for Hadoop eco system like HDFS, Map reduce, Hive, Hbase, Pig, sqoop,sqoop2, Avro, solr, hcatalog, impala, Oozie, Zoo Keeper and Hadoop distribution like Cloudera, Hortonwork etc.
forum_admin
Site Admin
Posts: 185
Joined: Wed Jul 16, 2014 9:22 pm
Contact:

python ODBC kerberos Error

Postby forum_admin » Thu Jul 26, 2018 8:15 pm

Hi while I try to connect the hive using python odic I am getting below error.

I see that issue is internal DNS attched which not found in kerberos database.

Code: Select all

connecting to database...
Traceback (most recent call last):
  File "hive_test.py", line 47, in <module>
    con = get_connection()
  File "hive_test.py", line 29, in get_connection
    'KrbServiceName=hive;' , autocommit=True)
pyodbc.Error: ('HY000', '[HY000] [unixODBC][Hortonworks][Hardy] (34) Error from server: SASL(-1): generic failure: GSSAPI Error: Unspecified GSS failure.  Minor code may provide more information (Server hive/ip-local.us-west-2.compute.internal@NMPHADOOP.COM not found in Kerberos database). (34) (SQLDriverConnect)')


forum_admin
Site Admin
Posts: 185
Joined: Wed Jul 16, 2014 9:22 pm
Contact:

Re: python ODBC kerberos Error

Postby forum_admin » Thu Jul 26, 2018 8:18 pm

Go in etc/resolv.conf and remove below line.

Code: Select all

vi /etc/resolv.conf
#search us-west-2.compute.internal



Code: Select all

con=pyodbc.connect('DRIVER={MyHive};' +
                       'host=hostname;' +
         'port=10000;' +
         'UID=' + "test;" +
         'AuthMech=1;' +
         'KrbRealm=REALAMCOM;' +
         'KrbHostFQDN=ip-LOACL-fqdn;' +   
         'KrbServiceName=hive;' , autocommit=True)


Return to “Hadoop and Big Data”

Who is online

Users browsing this forum: No registered users and 1 guest