Created on 09-30-2016 11:41 AM - edited 09-16-2022 03:42 AM
We have a 15 Node Kerborised Impala Cluster with a HAProxy. We have no issue using HUE to run queries.
We are also able to use the ODBC Driver on a Windows Machine, authenticate with Kerberos and connect to the Impala via HA Proxy.
However, when we try to connect to the Impala HA Proxy using SQL Workbench via JDBC Driver. We get the following error message:
[Simba][ImpalaJDBCDriver](500310) Invalid operation: Unable to obtain Principal Name for authentication ;
The connection string is:
jdbc:impala://<PUBLIC IP ADDRESS>:21051;AuthMech=1;KrbRealm=<REALM>;KrbHostFQDN=<fqdn>;KrbServiceName=impala;
We tried adding the Principal parameter, but it doesn't help. Any ideas, on how to get Impala JDBC to work from a windows machine using Kerberos?
Created 09-22-2017 07:39 AM
Do you have JCE installed in you system?
Created 09-22-2017 09:39 PM
Created on 09-25-2017 05:40 AM - edited 09-25-2017 05:44 AM
Do you connect from Windows or Linux box?
Are you sure that you have valid kerberos ticket on your machine? Could you run klist, please?
If you want to use jaas they config should more like this:
Client { com.sun.security.auth.module.Krb5LoginModule required useKeyTab=true keyTab="PathToTheKeyTab" principal="cloudera@CLOUDERA" doNotPrompt=true; };
Created 09-25-2017 05:43 AM
Hi,
We're trying to connect from windows machine. We have a valid ticket listed from klist. The error we are getting from rstudio is :
“Error in .jcall(drv@jdrv, "Ljava/sql/Connection;", "connect", as.character(url)[1], :
java.sql.SQLException: [Cloudera][HiveJDBCDriver](500168) Error creating login context using ticket cache: Unable to obtain Principal Name for authentication .”
Created on 09-25-2017 05:53 AM - edited 09-25-2017 05:55 AM
Could you show me the output of the klist command, please?
Where do you cache kerberos tickets? Do you have env variable to set this up?
Created 09-26-2017 01:54 AM
Hi,
I'm not able to klist now. After i run kdestroy -a and then i generate a ticket, the ticket is created successfully but the the ticket is not displayed through klist and the error happens to be the same.
Created 09-26-2017 02:07 AM
Created 09-26-2017 02:21 AM
Hi,
Just wanted to add a point: after kinit the ticket is generated succefully. It is shown in the MIT Kerberos Ticket Manager but it is not viewed in klist. We're following this link: https://www.cloudera.com/documentation/other/connectors/hive-jdbc/latest/Cloudera-JDBC-Driver-for-Ap...
Just few things:
1) Set an environment variable that points to kerberostickets.txt
After it didn't work:
1) Removed the environment variable and followed the next step of JAAS conf. This led to successful hive connectivity through java but in R we're getting the error
2) After running kdestroy, and then kinit. The klist does not give anything. It gives null or empty. Now unable to run it through java too.
2) Set the environment variable again to point to CredentialCache file. It again gives empty klist.
This is in Windows machine
Created 09-26-2017 02:33 AM
Created 09-26-2017 02:40 AM
Yes we have the environment variable set:
KRB5CCNAME: C:\KerberosTickets.txt
We also tried removing it for the JAAS conf requirement.
We have the env variable set currently