hadoop 3.2.1
hbase 2.2.5
各种配置之后,出现的错误具体为:
进去 hbase shell 之后,出现:
hbase(main):001:0> list_namespace
NAMESPACE
ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing
at org.apache.hadoop.hbase.master.HMaster.checkInitialized(HMaster.java:2811)
at org.apache.hadoop.hbase.master.HMaster.getNamespaces(HMaster.java:3107)
at org.apache.hadoop.hbase.master.MasterRpcServices.listNamespaceDescriptors(MasterRpcServices.java:1261)
at org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:418)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:133)
at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:338)
at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:318)
For usage try 'help "list_namespace"'
Took 8.7219 seconds
比较伤脑筋。
其根源在于,有的server没有online
为这个问题搞了好久,包括换版本。但是自己确信早先是工作的啊。
后来彻底的初始化,才好了。其根源在于 ./hdfsdfs -rm-r /hbase 这句话。
因此,纯粹,彻底的初始化步骤:
清除/hbase文件系统,清除zk,然后才会好。
liuzhi@sihan-local:/data/hadoop-3.2.1/bin$ ./hdfs dfs -rm -r /hbase Deleted /hbase liuzhi@sihan-local:/data/hadoop-3.2.1/bin$ cd /data/zookeeper/ liuzhi@sihan-local:/data/zookeeper$ ./bin/zkCli.sh [zk: localhost:2181(CONNECTED) 0] ls / [admin, brokers, cluster, config, consumers, controller, controller_epoch, hbase, isr_change_notification, latest_producer_id_block, log_dir_event_notification, zookeeper] [zk: localhost:2181(CONNECTED) 2] deleteall /hbase Node does not exist: /hbase [zk: localhost:2181(CONNECTED) 3] ls / [admin, brokers, cluster, config, consumers, controller, controller_epoch, isr_change_notification, latest_producer_id_block, log_dir_event_notification, zookeeper] [zk: localhost:2181(CONNECTED) 4] quit
如果有kerberos的
Authentication is not valid : /hbase/splitWAL
.解决方式
1) 先使用命令查看该节点的权限
getAcl /hbase 返回结果如下图所示
可以看到sasl用户是hbase
2)编写jaas-zk-keytab.conf文件
Client {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="/root/hbasenew.keytab"
storeKey=true
useTicketCache=false
principal="hbase@RSD.COM";
};
在执行zookeeper-client前将jaas-zk-keytab.conf加载到环境变量
export CLIENT_JVMFLAGS="-Djava.security.auth.login.config=jaas-zk-keytab.conf"
4.登陆zookeeper
zookeeper-client -server master:2181
连接客户端时候一定要用-server参数指定zookeeper节点,不然连接不上
5.删除节点
成功删除。
这样子纯粹做了一遍之后,重启hbase 确实好了



