启动hbase时问题列表:
1 查看hbase-hadoop-master-ubuntu118.log,发现其中的错误为
2012-09-02 22:59:58,099 INFO org.apache.hadoop.hbase.ipc.HBaseRpcMetrics: Initializing RPC Metrics with hostName=HMaster, port=60000
2012-09-02 22:59:58,217 ERROR org.apache.hadoop.hbase.master.HMasterCommandLine: Failed to start master
java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster
at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1065)
at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:142)
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:102)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76)
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1079)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.configuration.Configuration
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.<init>(DefaultMetricsSystem.java:37)
at org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.<clinit>(DefaultMetricsSystem.java:34)
at org.apache.hadoop.security.UgiInstrumentation.create(UgiInstrumentation.java:51)
at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:219)
at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:187)
at org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:239)
at org.apache.hadoop.security.KerberosName.<clinit>(KerberosName.java:83)
at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:212)
at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:187)
at org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.hbase.util.Methods.call(Methods.java:37)
at org.apache.hadoop.hbase.security.User.call(User.java:457)
at org.apache.hadoop.hbase.security.User.callStatic(User.java:447)
at org.apache.hadoop.hbase.security.User.access$200(User.java:49)
at org.apache.hadoop.hbase.security.User$SecureHadoopUser.isSecurityEnabled(User.java:435)
at org.apache.hadoop.hbase.security.User$SecureHadoopUser.login(User.java:406)
at org.apache.hadoop.hbase.security.User.login(User.java:146)
at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:202)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1060)
... 5 more
2 终端启动hbase时显示如下错误:
192.168.0.186: Exception in thread "main" java.lang.RuntimeException: Failed construction of Regionserver: class org.apache.hadoop.hbase.regionserver.HRegionServer
192.168.0.186: at org.apache.hadoop.hbase.regionserver.HRegionServer.constructRegionServer(HRegionServer.java:2775)
192.168.0.186: at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.start(HRegionServerCommandLine.java:60)
192.168.0.186: at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.run(HRegionServerCommandLine.java:75)
192.168.0.186: at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
192.168.0.186: at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76)
192.168.0.186: at org.apache.hadoop.hbase.regionserver.HRegionServer.main(HRegionServer.java:2799)
192.168.0.186: Caused by: java.lang.reflect.InvocationTargetException
192.168.0.186: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
192.168.0.186: at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
192.168.0.182: Exception in thread "main" java.lang.RuntimeException: Failed construction of Regionserver: class org.apache.hadoop.hbase.regionserver.HRegionServer
192.168.0.182: at org.apache.hadoop.hbase.regionserver.HRegionServer.constructRegionServer(HRegionServer.java:2775)
192.168.0.182: at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.start(HRegionServerCommandLine.java:60)
192.168.0.182: at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.run(HRegionServerCommandLine.java:75)
192.168.0.182: at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
192.168.0.182: at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76)
192.168.0.182: at org.apache.hadoop.hbase.regionserver.HRegionServer.main(HRegionServer.java:2799)
192.168.0.182: Caused by: java.lang.reflect.InvocationTargetException
192.168.0.182: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
192.168.0.182: at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
3 在终端输入jps后发现没有启动Hmaster进程。
以上三个问题其实问题就只有一个,就是要将hadoop中lib下的hadoop-core-1.0.2.jar和commons-configuration-1.6.jar包移动到hbase-0.90.5中的lib下面,具体操作如下:
代码语言:javascript复制 hadoop@ubuntu186:~/hadoop-1.0.2$ cp hadoop-core-1.0.2.jar /home/hadoop/hbase-0.90.5/lib/
hadoop@ubuntu186:~/hadoop-1.0.2/lib$ cp commons-configuration-1.6.jar /home/hadoop/hbase-0.90.5/lib/
(以上操作在每个机器上都要执行)
同时需要注意:在每个机器上调整时间使相互之间时间一致,具体操作如下:
代码语言:javascript复制 cp /usr/share/zoneinfo/Asia/Chongqing /etc/localtime
hwclock -w
date