【发布时间】:2017-03-06 10:45:49
【问题描述】:
我的 Hive 服务器启用了 SSL 和 Kerberos。但是当我尝试使用以下命令通过直线连接到 hiverserver2 时:
*!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*
我收到以下错误:
错误:无法使用 JDBC Uri 打开客户端传输:jdbc:hive2://hostnameOfServer:10000/hive;ssl=true;sslTrustStore=keystorePath ;trustStorePassword=密码 密钥库;principal=Kerberos hive 主体 数据库用户名 数据库密码 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 是否相互兼容?
【问题讨论】:
-
旁注:使用 Kerberos 身份验证,
user和password参数将被忽略。您必须 (a) 在默认票证缓存中拥有有效的 Kerberos 票证,或者 (b) 提供原始 JAAS 配置来定义如何自动创建票证(通过 Java系统属性)。