Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hive, Beeline: Peer indicated failure: GSS initiate failed

Tags:

hadoop

hive

I'm launching beeline to test Sentry using account added in Kerberos:

beeline -u "jdbc:hive2://IP:10000/;principal=test_table/[email protected]" 

but

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
    Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
    scan complete in 3ms
    Connecting to jdbc:hive2://IP:10000/;principal=test_table/[email protected]
    Error: Could not open client transport with JDBC Uri: jdbc:hive2://IP:10000/;principal=test_table/[email protected]: Peer indicated failure: GSS initiate failed (state=08S01,code=0)
    Beeline version 1.1.0-cdh5.5.0 by Apache Hive

However, if I connect with account hive, it works!

 beeline -u "jdbc:hive2://IP:10000/;principal=hive/[email protected]"

Why could this happen? By the way, I used kinit to the account on my client.

like image 474
user3692015 Avatar asked Nov 08 '22 08:11

user3692015


1 Answers

For beeline, the principal param in '!connect' must be hive@domainname, but who you are and what you can do in hive is controlled by the kerberos' tgt ,which is assigned by kinit.

like image 108
Kai Avatar answered Nov 15 '22 12:11

Kai