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