2017-03-06 75 views
0

我的Hive服務器是SSL以及啓用了Kerberos。但是,當我嘗試連接通過直線到hiverserver2使用下面的命令:SSL和Kerberos在Hive Server上是否相互兼容?

*!connect jdbc:hive2://**hostnameOfServer**:10000/hive;ssl=true;sslTrustStore=**keystorePath**;trustStorePassword=**passwordfor keystore**;principal=**Kerberos hive principal** **database username** **database password** org.apache.hive.jdbc.HiveDriver* 

我獲得以下錯誤:

Error: Could not open client transport with JDBC Uri: jdbc:hive2://hostnameOfServer:10000/hive;ssl=true;sslTrustStore=keystorePath;trustStorePassword=passwordfor keystore;principal=Kerberos hive principaldatabase username database password org.apache.hive.jdbc.HiveDriver: Invalid status 21 (state=08S01,code=0)

而且我試着用在直線以下命令:

jdbc:hive2://**hostnameOfServer**:10000/hive;principal=**Kerberos hive principal**?transportMode=https;httpPath=cliservice;auth=kerberos;sasl.qop=auth. 

但得到同樣的錯誤。

ssl和kerberos是否相互兼容?

+0

邊注:Kerberos身份驗證,'user'和'password' ARGS被忽略。您必須*(a)*在默認票證緩存中擁有有效的Kerberos票證或*(b)*提供原始JAAS配置以定義如何自動(通過Java系統屬性)創建票證。 –

回答

0

是的,它與版本Hive-2.0.0兼容。檢查以下JIRA任務以獲取更多信息

https://issues.apache.org/jira/browse/HIVE-14019

+0

這是「二進制」協議(默認的)。在此之前,您可以切換到HTTP協議以同時擁有SSL和Kerberos。 –