PDA

View Full Version : Hive2 JDBC connection with Kerberos



iShotAlex
10-28-2013, 10:53 AM
Hi,

Do we know if it's possible?

I have a valid Kerbero tkt:



C:\Program Files\Java\jre6\bin>klist

Credentials cache: C:\Users\user\krb5cc_user


Default principal: user@xxx.xxxxxxxx.LAN, 1 entry found.


[1] Service Principal: krbtgt/xxx.xxxxxxxx.LAN@xxx.xxxxxxxx.LAN
Valid starting: Oct 28, 2013 12:11
Expires: Oct 29, 2013 12:11



I installed the latest big data plugin (could connect OK with the Hive2 driver before kerberos was installed)

I specifed the principal as a parameter so that my connection string looks like:


jdbc:hive2://xxx.xx.x.xxx:10000/default;PRINCIPAL=user

I'm getting this error message:


Error connecting to database: (using class org.apache.hive.jdbc.HiveDriver)
Could not establish connection to jdbc:hive2://xxx.xx.x.xxx:10000/default;PRINCIPAL=user: Peer indicated failure: Unsupported mechanism type PLAIN


Thanks in advance!!

iShotAlex
10-28-2013, 11:08 AM
Update:

After investigating a little more, I changed the connection string to:



jdbc:hive2://xxx.xx.x.xxx:10000/default;principal=hive/user@xxx.xxxxxxx.LAN


The error I'm getting now is:



Error connecting to database: (using class org.apache.hive.jdbc.HiveDriver)
Could not establish connection to jdbc:hive2://xxx.xx.x.xxx:10000/default;principal=hive/user@xxx.xxxxxxx.LAN: GSS initiate failed