当前位置:   article > 正文

zkCli 连接 Kerberos认证的 Zookeeper 集群_kerberos默认下zkclis.sh可以进入

kerberos默认下zkclis.sh可以进入

zookeeper配置了kerberos之后。
先执行
klist -kt /etc/security/keytabs/zk.service.keytab

再执行
kinit -kt /etc/security/keytabs/zk.service.keytab ${Principal}
Principal 的值复制 klist 命令中 Principal 这一列的值。

执行 zkCli.sh 后提示 AUTH_FAILED

2021-11-24 16:16:28,622 - ERROR [main-SendThread(localhost:2181):ClientCnxn$SendThread@1059] - SASL authentication with Zookeeper Quorum member failed: javax.security.sasl.SaslException: An error: (java.security.PrivilegedActionException: javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Server not found in Kerberos database (7) - LOOKING_UP_SERVER)]) occurred when evaluating Zookeeper Quorum Member's  received SASL token. Zookeeper Client will go to AUTH_FAILED state.

WATCHER::

WatchedEvent state:AuthFailed type:None path:null
  • 1
  • 2
  • 3
  • 4
  • 5

输入回车, 显示连接 localhost:2181

[zk: localhost:2181(AUTH_FAILED) 0] 
  • 1

因为 principle 不是 localhost。改为连接 principle 中的主机名。

[zk: localhost:2181(AUTH_FAILED) 0] connect master-1:2181
  • 1

可以看到已经连接。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/302390
推荐阅读
相关标签
  

闽ICP备14008679号