启动hbase后执行create命令报错 ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing
这两天用hbase莫名报错,可能是因为非法关闭导致的?
启动hbase后执行create命令报错如下。
ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing
at org.apache.hadoop.hbase.master.HMaster.checkInitialized(HMaster.java:2977)
at org.apache.hadoop.hbase.master.HMaster.disableTable(HMaster.java:2524)
at org.apache.hadoop.hbase.master.MasterRpcServices.disableTable(MasterRpcServices.java:726)
at org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:413)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130)
at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324)
at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304)
解决办法:(该办法亲测可行,但会把hbase清空)停掉hbase。进入zkCli.sh执行命令deleteall /hbase删除zookeeper中的hbase相关数据,再进入hdfs中删除hbase的相关数据。停掉zookeeper、hdfs,重启机器后便可恢复正常。