Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

While trying to start Hbase getting the following error. Error: Could not find or load main class org.apache.hadoop.hbase.master.HMaster

avatar
Expert Contributor

While trying to start Hbase as

[hbase@hdpclient1 ~]$ /usr/hdp/current/hbase-master/bin/hbase-daemon.sh start master; sleep 25

getting the below error.

Error: Could not find or load main class org.apache.hadoop.hbase.master.HMaster.

Please help me. Thanks in advance.

1 ACCEPTED SOLUTION

avatar
@Raghu Ramamoorthi

When you try to start Hbase manually, the classpath needs to be correctly set. In this case it looks like the classpath for hbase is not correctly set. You could review hbase-env in Ambari Hbase configs to check what you need to set before actually running the command manually. Or /etc/hbase/conf/hbase-env.sh in the node where hbase is installed.

We should focus on the reason for the Hbase to go down after you start from Ambari. Please check /var/log/hbase/hbase*master*log to check why it failed after the service start up came up good. That would help in resolving your issue.

View solution in original post

15 REPLIES 15

avatar
Expert Contributor
@vpoornalingam

Thank you so much for the help.

log file inside /var/log/hbase says that Error: Could not find or load main class org.hadoop.hbase.master.HMaster.

Any idea ?

avatar

I suspect that hbase is not correctly installed. When you go to /usr/hdp/current/hbase*/lib, do you find jar files? could you please list them?

avatar
Expert Contributor

@vpoornalingam

There is no jars related to Hbase.

Only ranger-hbase-plugin-impl and ranger-hbase-plugin-shim-0.5.0.2.4.0.0-169.jar available inside /usr/hdp/current/hbase-master/lib directory.

Please advise

Thanks in advance!

avatar

Are you connected to the hbase master system as listed by Ambari? If so, hbase isn't correctly installed for some reason. Is this a test cluster? If so please remove HBase using API and add it back using Ambari add service. You could refer Cwik pages for the same.

avatar
Expert Contributor
@vpoornalingam

Thank you so much for the help sir.

I have done the re-installation as you suggested. Additionally i have downloaded the jar files and placed inside the /usr/hdp/current/hbase/lib folder.

the issue is fixed. Hbase master is up and running.

thank you very much for the help.

avatar
Expert Contributor

This error is because of symbolic link is broken for (Means hbase client jar is not present in the node) -

ll /usr/hdp/current/hbase-client/lib/hbase-client.jar

Put your hbase client jar from another node to the non working node-

/usr/hdp/current/hbase-client/lib/hbase-client-*.jar

Please note that, if you don't have other jars as well, then copy all the necessary missing jars from other node-

/usr/hdp/current/