当前位置:   article > 正文

HBase错误:PleaseHoldException: Master is initializing解决记录_error: org.apache.hadoop.hbase.pleaseholdexception

error: org.apache.hadoop.hbase.pleaseholdexception: master is initializing

先说版本,jdk版本只要是1.8即可。

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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

比较伤脑筋。

其根源在于,有的server没有online

为这个问题搞了好久,包括换版本。但是自己确信早先是工作的啊。

后来彻底的初始化,才好了。其根源在于 ./hdfsdfs -rm-r /hbase 这句话。

因此,纯粹,彻底的初始化步骤:

清除/hbase文件系统,清除zk,然后才会好。

liuzhi@sihan-local:/data/hadoop-3.2.1/bin$ ./hdfs dfs -chmod -R 777 /hbase
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) 1] rmr /hbase
The command 'rmr' has been deprecated. Please use 'deleteall' instead.
[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
 
WATCHER::
 
WatchedEvent state:Closed type:None path:null
2021-08-22 12:23:47,419 [myid:] - INFO  [main:ZooKeeper@1422] - Session: 0x17b69d57058000b closed
2021-08-22 12:23:47,419 [myid:] - INFO  [main-EventThread:ClientCnxn$EventThread@524] - EventThread shut down for session: 0x17b69d57058000b 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

这样子纯粹做了一遍之后,确实好了

liuzhi@sihan-local:/data/hbase-2.2.5/bin$ ./hbase shell
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/data/hbase-2.2.5/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/data/hbase-2.2.5/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
2021-08-22 12:27:10,427 WARN  [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
HBase Shell
Use "help" to get list of supported commands.
Use "exit" to quit this interactive shell.
For Reference, please visit: http://hbase.apache.org/2.0/book.html#shell
Version 2.2.5, rf76a601273e834267b55c0cda12474590283fd4c, 2020年 05月 21日 星期四 18:34:40 CST
Took 0.0274 seconds
hbase(main):001:0> list_namespace
list_namespace          list_namespace_tables
hbase(main):001:0> list_namespace
NAMESPACE
default
hbase
2 row(s)
Took 0.2480 seconds
hbase(main):002:0> list_namespace
NAMESPACE
default
hbase
2 row(s)
Took 0.0076 seconds
hbase(main):003:0>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28

本文也进一步验证了,hadoop 3.2.1 加上 hbase 2.2.5 是可以工作的。

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

闽ICP备14008679号