- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Hive- Kerberos authentication issue with hive JDBC driver
- Labels:
-
Apache Hive
-
Kerberos
Created on 09-22-2017 01:39 AM - edited 09-16-2022 05:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We got ODBC Connection working with Kerberos. However, JDBC has issues identifying the Kerberos Principal.
The Connection string is: jdbc:hive2://{PUBLIC IP ADDRESS}:10000;AuthMech=1;KrbRealm={REALM};KrbHostFQDN={fqdn};KrbServiceName=impala;LogLevel=6;LogPath=/path/to/directory
we're getting the following error:
[Cloudera][HiveJDBCDriver](500168) Error creating login context using ticket cache: Unable to obtain Principal Name for authentication.
Please help us resolving the issue.
Thanks in advance
Created 09-22-2017 07:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I followed the following approaches after that:
- Deleted the KRB5CCNAME environment variable containing the path to the KerberosTickets.txt.
- Set up the Kerberos configuration file( krb5.ini) and entered the values as per the krb5.conf file in the dev cluster node.
- Set up the JAAS login configuration file with the following fields:
Client {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=false
principal="user@COMPANY.COM"
doNotPrompt=true;
};
And set the environment variable java.security.auth.login.config to the location of the JAAS config file.
- When I tried connecting to hive in JAVA after making these changes, the connection was made successfully.
- But when I tried the same code in Rstudio, I faced exception:
“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 .”
- Also, I tried this code in R Console, but the following exception cropped up:
“java.sql.SQLException: [Cloudera][HiveJDBCDriver](500164) Error initialized or created transport for authentication: [Cloudera][HiveJDBCDriver](500169) Unable to connect to server: GSS initiate failed”
My understanding is that it is R is not able to get the environment variable path. correct me if i'm wrong.
I've seen many links in google but that didn't work.
I'm using
Rconsole :3.4.1 and
RStudio : version 1.1.353
Please suggest us how do we proceed further.
Thanks