TKh TKh - 1 year ago 339
Java Question

Hive JDBC Kerberose Authentication Error: GSS initiate failed

I am trying to connect to Hive through JDBC using the following connection string:


hiveConString = "jdbc:hive2://localhost:10000/default;principal=hive/_HOST@HADOOP.LOCALDOMAIN"

Though I encounter the following error:

Exception in thread "main" java.sql.SQLException: Could not open client transport with JDBC Uri:jdbc:hive2://localhost:10000/default;principal=hive/_HOST@HADOOP.LOCALDOMAIN:GSS initiate failed

I already checked the hive-site.xml to ensure that kerbersoe authentication is followed. The XML file includes:


I have also made sure that all of the required Maven repositories are included.

Also, I am running the code on a VM using Eclipse.

Answer Source

If using a VM with kerberos authentication and your authentication has not expired you will need to specify the following VM arguments when running your java code:"/etc/krb5.conf"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download