我正在使用windows机器,并尝试使用hiveuberjar用dbvisualizer设置hive。但是得到的错误如下。不知道为什么?https://github.com/timveil/hive-jdbc-uber-jar
我使用下面的exe在windows上生成keytab文件。http://web.mit.edu/kerberos/dist/index.html
以及github页面上提到的所有步骤。
如果我使用用户主体,我会得到以下错误。
dbc:hive2网址:aaa.corp.ad。:2181,bbbb.corp.ad。:2181,ccc.corp.ad。:2181/;servicediscoverymode=Zookeeper;zookeepernamespace=hiveserver2;校长=高朗。shah@corp.ad.
错误消息
Long Message:
Kerberos principal should have 3 parts: gaurang.shah@CORP.AD.CTC
Details:
Type: java.lang.IllegalArgumentException
Stack Trace:
java.lang.IllegalArgumentException: Kerberos principal should have 3 parts: gaurang.shah@CORP.AD.CTC
at org.apache.hive.service.auth.KerberosSaslHelper.getKerberosTransport(KerberosSaslHelper.java:48)
at org.apache.hive.jdbc.HiveConnection.createBinaryTransport(HiveConnection.java:425)
at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:202)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:166)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.onseven.dbvis.g.B.D.ā(Z:1548)
at com.onseven.dbvis.g.B.F$A.call(Z:1369)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
如果我使用下面提到的服务器主体,错误就不同了。
dbc:hive2网址:aaa.corp.ad。:2181,bbbb.corp.ad。:2181,ccc.corp.ad。:2181/;servicediscoverymode=Zookeeper;zookeepernamespace=hiveserver2;委托人=krbgt/corp.ad。@corp.ad.
错误:
Long Message:
Could not open client transport for any of the Server URI's in ZooKeeper: GSS initiate failed
Details:
Type: java.sql.SQLException
SQL State: 08S01
1条答案
按热度按时间izj3ouym1#
萨姆森在评论中提供的答案对我很有用。
使用prinicpal作为
hive/_HOST@CORP.AD.ABC
解决了问题。