Saurabh Rana
Saurabh Rana

Reputation: 167

running any commands in hbase shell give exception master is initializing

Hbase was running fine earlier. Now running any command from hbase shell gives this error message saying "master is initializing"

message: ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing

If I do JPS: I can see the below services:

14422 ResourceManager 14203 SecondaryNameNode 24674 ThriftServer 24362 HQuorumPeer 25247 Jps 13986 NameNode 8913 Main 24433 HMaster 32206 Master

I tried restarting the server but it did not help.

thanks

Upvotes: 0

Views: 2715

Answers (2)

Harshit Mathur
Harshit Mathur

Reputation: 76

I was also having the same issue, the reason seems that the HMaster and HQuorumPeer having issues coordinating with the Region Servers. Later we found that there is time sync problem among the region servers.

So I would suggest that,

  1. Stop hbase by command. (if it doesn't get stopped, kill mannually the process).
  2. Stop all the region servers and HMaster.
  3. Sync the time of the region servers with the server hosting HMaster, you can use the following command.

sudo date --set="$(ssh username@serverip date)"

  1. Now start hbase.

It worked for me, i hope it will also work for you :)

Upvotes: 1

Mostafa
Mostafa

Reputation: 3302

Try clearing all the states in Zookeeper. by following these steps:

1) stop Zookeeper

2) wipe the Zookeeper data directory

3) restart it

Also can you share /etc/hosts file content in your HBase Cluster? You have to edit your /etc/hosts file because HBase probably can't connect to localhost using 127.0.0.1

Let me know if this helps.

Upvotes: 0

Related Questions