1、启动hbase以后,jps发现很快HMASTER进程就退出了。
[root@gfs01 data]# jps
6482 Jps
4083 QuorumPeerMain
2180 SecondaryNameNode
12582 -- process information unavailable
2364 ResourceManager
1967 NameNode
没有HMaster进程。
2、查看hbase启动日志
[root@gfs01 logs]# pwd
/usr/hbase-2.1.6/logs
[root@gfs01 logs]# ll
total 7212
-rw-r--r-- 1 root root 1634526 Oct 8 00:47 hbase-root-master-gfs01.log
-rw-r--r-- 1 root root 492 Oct 8 00:37 hbase-root-master-gfs01.out
-rw-r--r-- 1 root root 492 Oct 8 00:33 hbase-root-master-gfs01.out.1
-rw-r--r-- 1 root root 492 Oct 8 00:20 hbase-root-master-gfs01.out.2
-rw-r--r-- 1 root root 492 Oct 5 07:47 hbase-root-master-gfs01.out.3
-rw-r--r-- 1 root root 492 Oct 5 07:37 hbase-root-master-gfs01.out.4
-rw-r--r-- 1 root root 4345824 Oct 8 00:47 hbase-root-regionserver-gfs01.log
-rw-r--r-- 1 root root 492 Oct 8 00:37 hbase-root-regionserver-gfs01.out
-rw-r--r-- 1 root root 492 Oct 8 00:33 hbase-root-regionserver-gfs01.out.1
-rw-r--r-- 1 root root 492 Oct 8 00:21 hbase-root-regionserver-gfs01.out.2
-rw-r--r-- 1 root root 492 Oct 5 07:48 hbase-root-regionserver-gfs01.out.3
-rw-r--r-- 1 root root 492 Oct 5 07:37 hbase-root-regionserver-gfs01.out.4
-rw-r--r-- 1 root root 755 Oct 8 00:41 SecurityAuth.audit
[root@gfs01 logs]#
2019-10-05 07:37:36,660 ERROR [main] regionserver.HRegionServer: Failed construction RegionServer
java.lang.NoClassDefFoundError: org/apache/htrace/SamplerBuilder
at org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:644)
at org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:628)
at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:149)
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2667)
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:93)
at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2701)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2683)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:372)
at org.apache.hadoop.fs.Path.getFileSystem(Path.java:295)
at org.apache.hadoop.hbase.util.CommonFSUtils.getRootDir(CommonFSUtils.java:361)
at org.apache.hadoop.hbase.util.CommonFSUtils.isValidWALRootDir(CommonFSUtils.java:411)
at org.apache.hadoop.hbase.util.CommonFSUtils.getWALRootDir(CommonFSUtils.java:387)
at org.apache.hadoop.hbase.regionserver.HRegionServer.initializeFileSystem(HRegionServer.java:712)
at org.apache.hadoop.hbase.regionserver.HRegionServer.(HRegionServer.java:621)
at org.apache.hadoop.hbase.master.HMaster.(HMaster.java:494)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:3091)
at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:236)
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:140)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:149)
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:3109)
Caused by: java.lang.ClassNotFoundException: org.apache.htrace.SamplerBuilder
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 25 more
2019-10-05 07:37:36,662 ERROR [main] master.HMasterCommandLine: Master exiting
java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster.
at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:3098)
at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:236)
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:140)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:149)
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:3109)
Caused by: java.lang.NoClassDefFoundError: org/apache/htrace/SamplerBuilder
at org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:644)
at org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:628)
at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:149)
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2667)
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:93)
at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2701)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2683)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:372)
at org.apache.hadoop.fs.Path.getFileSystem(Path.java:295)
at org.apache.hadoop.hbase.util.CommonFSUtils.getRootDir(CommonFSUtils.java:361)
at org.apache.hadoop.hbase.util.CommonFSUtils.isValidWALRootDir(CommonFSUtils.java:411)
at org.apache.hadoop.hbase.util.CommonFSUtils.getWALRootDir(CommonFSUtils.java:387)
at org.apache.hadoop.hbase.regionserver.HRegionServer.initializeFileSystem(HRegionServer.java:712)
at org.apache.hadoop.hbase.regionserver.HRegionServer.(HRegionServer.java:621)
at org.apache.hadoop.hbase.master.HMaster.(HMaster.java:494)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:3091)
... 5 more
Caused by: java.lang.ClassNotFoundException: org.apache.htrace.SamplerBuilder
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 25 more
Sat Oct 5 07:47:55 CST 2019 Starting master on gfs01
3、解决
将/usr/hbase-2.1.6/lib/client-facing-thirdparty/htrace-core-3.1.0-incubating.jar文件拷贝到/usr/hbase-2.1.6/lib/下面即可
cp /usr/hbase-2.1.6/lib/client-facing-thirdparty/htrace-core-3.1.0-incubating.jar /usr/hbase-2.1.6/lib/
4、重新启动hbase
start-hbase.sh