1、問題描述
(1)HBase啟動
[Hadoop@master conf]$ start-hbase.sh
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/grid/Hadoop/hadoop-3.3.1/share/hadoop/common/lib/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/grid/HBase/hbase-3.0.0/lib/client-facing-thirdparty/log4j-slf4j-impl-2.14.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
running master, logging to /home/grid/HBase/hbase-3.0.0/logs/hbase-grid-master-master.out
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/grid/Hadoop/hadoop-3.3.1/share/hadoop/common/lib/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/grid/HBase/hbase-3.0.0/lib/client-facing-thirdparty/log4j-slf4j-impl-2.14.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
slave1: regionserver running as process 20374. Stop it first.
slave3: regionserver running as process 20247. Stop it first.
master2: regionserver running as process 20879. Stop it first.
slave2: regionserver running as process 20581. Stop it first.
master: regionserver running as process 9846. Stop it first.
(2)查看HMaster
[Hadoop@master conf]$ jps
4642 Master
3555 ResourceManager
7364 QuorumPeerMain
3303 SecondaryNameNode
3692 NodeManager
3122 DataNode
7955 ZooKeeperMain
9846 HRegionServer
4217 RunJar
16987 HMaster
2972 NameNode
4092 VersionInfo
4412 RunJar
17308 Jps
4734 Worker
(3)問題暴露
二次查看,HMaster消失。
[Hadoop@master conf]$ jps
4642 Master
3555 ResourceManager
7364 QuorumPeerMain
3303 SecondaryNameNode
3692 NodeManager
17326 Jps
3122 DataNode
7955 ZooKeeperMain
9846 HRegionServer
4217 RunJar
2972 NameNode
4092 VersionInfo
4412 RunJar
4734 Worker
2、問題剖析
(1)參考:
參考1:https://blog.csdn.net/zengxianglei/article/details/97558349
參考2:https://www.cnblogs.com/zlslch/p/9192887.html
(2)剖析:
hdfs的默認端口號是8020,而筆者的core-site.xml中將hdfs的端口修改為了9000。
當采用參考1解決不了問題時,可采用參考2(非常重要)。
3、解決方案
(1)修改Hbase中配置文件:hbase-site.xml,添加如下內容:
<property>
<name>hbase.rootdir</name>
<value>hdfs://master:9000/hbase</value>
</property>
(2)拷貝hbase-site.xml至集群各個節點(此處省略)。
(3)Hbase重新啟動(先停止Hbase,再啟動):
Step1:停止Hbase
[Hadoop@master conf]$ stop-hbase.sh
no hbase master found
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/grid/Hadoop/hadoop-3.3.1/share/hadoop/common/lib/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/grid/HBase/hbase-3.0.0/lib/client-facing-thirdparty/log4j-slf4j-impl-2.14.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Step2:啟動Hbase
[Hadoop@master conf]$ start-hbase.sh
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/grid/Hadoop/hadoop-3.3.1/share/hadoop/common/lib/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/grid/HBase/hbase-3.0.0/lib/client-facing-thirdparty/log4j-slf4j-impl-2.14.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
running master, logging to /home/grid/HBase/hbase-3.0.0/logs/hbase-grid-master-master.out
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/grid/Hadoop/hadoop-3.3.1/share/hadoop/common/lib/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/grid/HBase/hbase-3.0.0/lib/client-facing-thirdparty/log4j-slf4j-impl-2.14.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
2021-11-04 21:40:32,654 INFO [main] master.HMaster (HMaster.java:main(2980)) - STARTING service HMaster
2021-11-04 21:40:32,658 INFO [main] util.VersionInfo (VersionInfo.java:logVersion(112)) - HBase 3.0.0-alpha-1
2021-11-04 21:40:32,658 INFO [main] util.VersionInfo (VersionInfo.java:logVersion(112)) - Source code repository git://c1741ba7e144/home/zhangduo/hbase-rm/output/hbase revision=1883889e26fd1bac73630f48d1c6e9adab0230e4
2021-11-04 21:40:32,658 INFO [main] util.VersionInfo (VersionInfo.java:logVersion(112)) - Compiled by zhangduo on Sun Jul 4 01:42:58 UTC 2021
2021-11-04 21:40:32,658 INFO [main] util.VersionInfo (VersionInfo.java:logVersion(112)) - From source with checksum e75e6d4f2c074feeed1d98896edd5afa92702fffb8abe1bf7e1873fabfca987f1ad8c8f67be599297779dddf9f09e677e7c1ff29712bb041240ecf061e736def
slave1: regionserver running as process 20374. Stop it first.
slave2: regionserver running as process 20581. Stop it first.
master2: regionserver running as process 20879. Stop it first.
slave3: regionserver running as process 20247. Stop it first.
master: regionserver running as process 9846. Stop it first.
(4)查看Hbase啟動情況:
[Hadoop@master conf]$ jps
4642 Master
3555 ResourceManager
18531 Jps
7364 QuorumPeerMain
18181 HMaster
3303 SecondaryNameNode
3692 NodeManager
3122 DataNode
7955 ZooKeeperMain
9846 HRegionServer
4217 RunJar
2972 NameNode
4092 VersionInfo
4412 RunJar
4734 Worker
間隔一定的時間,做二次驗證,jps結果一致。
從上面結果可知,HMaster成功啟動,HBase啟動正常了。