[HBase错误]-- 执行 hbase shell报错

本文记录了在使用Xshell连接HBase时遇到的GSSException错误及通过spark-shell连接Spark时出现的权限问题。分析指出,这些问题与Kerberos认证有关,并提供了具体的解决方案,包括如何在本地机器上执行kinit命令来生成必要的keytab文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

xshell进入hbase错误:

执行:hbase shell

Caused by: GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:147)
at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:121)
at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:187)
at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:223)
at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212)
at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179)
at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:193)
... 246 more

 

 

xshell进入spark错误:

执行:spark-shell

[e_lbvin@slave-32 conf]$ spark-shell
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel).
Welcome to
      ____              __
     / __/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  '_/
   /___/ .__/\_,_/_/ /_/\_\   version 1.6.0
      /_/

Using Scala version 2.10.5 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_67)
Type in expressions to have them evaluated.
Type :help for more information.
16/08/29 14:34:39 WARN util.Utils: Service 'SparkUI' could not bind on port 4040. Attempting port 4041.
16/08/29 14:34:39 WARN util.Utils: Service 'SparkUI' could not bind on port 4041. Attempting port 4042.
16/08/29 14:34:39 WARN util.Utils: Service 'SparkUI' could not bind on port 4042. Attempting port 4043.
16/08/29 14:34:40 WARN security.UserGroupInformation: PriviledgedActionException as:e_lbvin (auth:KERBEROS) cause:javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSExcept
ion: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]16/08/29 14:34:40 WARN ipc.Client: Exception encountered while connecting to the server : javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials 
provided (Mechanism level: Failed to find any Kerberos tgt)]16/08/29 14:34:40 WARN security.UserGroupInformation: PriviledgedActionException as:e_lbvin (auth:KERBEROS) cause:java.io.IOException: javax.security.sasl.SaslException: GSS initiate failed
 [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]

 

分析:没有权限,需要Kerberos认证

 

解决:
当前机器上执行----》
kinit -kt   /data/e_lvbin/e_lvbin.keytab      e_lvbin@ENN.CN

 

注意:e_lvbin.keytab需要生成

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

oo寻梦in记

你的鼓励将是我创作的最大动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值