dbvisualizer无法连接到kerberised配置单元

9njqaruj  于 2021-06-24  发布在  Hive
关注(0)|答案(0)|浏览(304)

我们有一个hdp(3.1.0)集群和hive(3.0.0.3.1)。团簇被煤化;
我正在尝试用dbvisualizer连接到hive,但没有成功。客户机(我从中使用dbvisualizer)是centos 7机器。
kerberos相关
在客户机上,这里是/etc/krb5.conf(从集群的一台机器复制/粘贴):

cat krb5.conf

[libdefaults]
  renew_lifetime = 7d
  forwardable = true
  default_realm = COMPANY.LOC
  ticket_lifetime = 24h
  dns_lookup_realm = false
  dns_lookup_kdc = false
  default_ccache_name = /tmp/krb5cc_%{uid}
  #default_tgs_enctypes = aes des3-cbc-sha1 rc4 des-cbc-md5
  #default_tkt_enctypes = aes des3-cbc-sha1 rc4 des-cbc-md5

[domain_realm]
  COMPANY.LOC = COMPANY.LOC

[logging]
  default = FILE:/var/log/krb5kdc.log
  admin_server = FILE:/var/log/kadmind.log
  kdc = FILE:/var/log/krb5kdc.log

[realms]
  COMPANY.LOC = {
    admin_server = server.company.loc
    kdc = server.company.loc
  }

我曾经 kinit 这是实验的结果 klist :

[florianc@localhost etc]$ klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: castelainf@COMPANY.LOC

Valid starting       Expires              Service principal
07/24/2020 09:12:03  07/24/2020 19:12:03  krbtgt/COMPANY.LOC@COMPANY.LOC
    renew until 07/31/2020 09:11:59

数据库可视化工具
版本: 11.0.4 (free) 工具>工具属性>在此处指定重写的java vm属性:

-Dsun.security.krb5.debug=true
-Djavax.security.auth.useSubjectCredsOnly=false
-Djava.security.krb5.conf="/etc/krb5.conf"

用于驱动程序的jar是中集群提供的jar Ambari>Hive>JDBC Standalone jar 连接的数据库url为:

jdbc:hive2://server1.company.loc:2181,server2.company.loc:2181,server3.company.loc:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;principal=hive/_HOST@COMPANY.LOC

尝试连接时返回的错误如下:

Could not open client transport for any of the Server URI's in ZooKeeper: Can't get Kerberos realm

编辑1
使用这些URI:

jdbc:hive2://server1.company.loc:2181/;principal=hive/_HOST@COMPANY.LO
jdbc:hive2://server1.company.loc:2181/;principal=hive/server1@COMPANY.LOC
jdbc:hive2://server1.company.loc:2181/;principal=hive/server1.company.loc@COMPANY.LOC

始终返回:

Could not open client transport with JDBC Uri <URI>: Can't get Kerberos realm

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题