栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

DataGrip 连接 Kerberos 认证的 hive 报 Hive JDBC Kerberose Authentication Error: GSS initiate failed 错误

DataGrip 连接 Kerberos 认证的 hive 报 Hive JDBC Kerberose Authentication Error: GSS initiate failed 错误

版本:hive-3.1.2 问题描述:

使用工具连接 hive 时,报如下错误:

The specified database user/password combination is rejected: [ 08S01] Could not open client transport with JDBC Uri: jdbc:hive2://singlenode:10000/;principal=hive/singlenode@EXAMPLE.COM: GSS initiate failed org.apache.thrift.transport.TTransportException: GSS initiate failed

解决方法:

确保添加了如下参数:

-Djava.security.krb5.conf="C:\ProgramData\MIT\Kerberos5\krb5.ini"
-Djava.security.auth.login.config="C:\ProgramData\MIT\Kerberos5\yhf.conf"
-Djavax.security.auth.useSubjectCredsonly=false

其中 yhf.conf:

com.sun.security.jgss.initiate{
   com.sun.security.auth.module.Krb5LoginModule required
   useKeyTab=true
   useTicketCache=false
   keyTab="C:\ProgramData\MIT\Kerberos5\yhf.keytab"
   principal="yhf@EXAMPLE.COM";
};

导出 keytab 文件至 yhf.conf 中 keyTab 指定路径:

kadmin.local -q"xst -norandkey -k /home/yhf/yhf.keytab yhf"

修改客户端的 krb5.ini 文件:
例如:C:ProgramDataMITKerberos5krb5.ini

[libdefaults]
 dns_lookup_realm = false
 ticket_lifetime = 24h
 forwardable = true
 rdns = false
 default_realm = EXAMPLE.COM
 udp_preference_limit = 1 # 添加这一项

重新测试链接显示成功!

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/728102.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号