An error occurs when HBase uses the shell command: pleaseholdexception: Master is initializing solution

Article catalog

Project scenario: Problem Description: Cause Analysis: solution:

Project scenario:


Problem Description:

The main errors are as follows: error: org.apache.hadoop.hbase.pleaseholdexception: Master is initializing

After starting the HBase shell, when using create, list and other commands, the following error messages appear:

hbase(main):001:0> list
ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing
        at org.apache.hadoop.hbase.master.HMaster.checkInitialized(
        at org.apache.hadoop.hbase.master.MasterRpcServices.getTableNames(
        at org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(
        at org.apache.hadoop.hbase.ipc.RpcExecutor$
        at org.apache.hadoop.hbase.ipc.RpcExecutor$

For usage try 'help "list"'

Took 10.297 seconds

Cause analysis:

Here, my computer is only configured with HBase application for Hadoop pseudo distributed cluster, so I don’t think it’s possible that the time of HBase and zookeeper servers is inconsistent, as others on the Internet say. The main reason should be: the processes of Hadoop and HBase are inconsistent, resulting in the initialization of the master node all the time


Format the HBase file system in Hadoop, restart HBase, and resynchronize the two:

Shut down all HBase services first:

cd /usr/local/hbase

Then close all Hadoop services:

cd /usr/local/hadoop

Enter JPS to ensure that all Hadoop and HBase processes are closed:

[email protected]:~$ jps
4673 Jps

Then start the Hadoop service:

cd /usr/local/hadoop

To view files in HDFS:

bin/hdfs dfs -ls /

The output shall be as follows (including/HBase):

[email protected]:/usr/local/hadoop$ bin/hdfs dfs -ls /
Found 1 items
drwxr-xr-x		- root supergroup 		0 2021-10-28 21:49 /hbase

Delete/HBase Directory:

bin/hdfs dfs -rm -r /hbase

Start HBase service:

cd /usr/local/hbase

Then start the shell and you should be able to use it:

bin/hbase shell

Read More: