我在两个ubuntu虚拟机上安装了hadoop多节点集群。
下一步,我尝试在此虚拟集群上安装HBase。但是,当我用start-hbase.sh
运行HBase时,尽管HMaster
已在主计算机和从计算机上正确运行,但HRegionServer
不在主计算机上运行。
[hbase-env.sh
]文件内容:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export HBASE_OPTS="$HBASE_OPTS -XX:+UseConcMarkSweepGC"
export HBASE_MANAGES_ZK=false
[hbase-site.xml
]文件内容:
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://machine-a:54310/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/usr/local/zookeeper</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>machine-a</value>
</property>
</configuration>
[zoo.cfg
]文件内容:
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/usr/local/zookeeper
clientPort=2181
正在运行的动物园管理员:
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper 3.4.13/bin/../conf/zoo.cfg
Starting zookeeper ... /usr/local/zookeeper 3.4.13/bin/zkServer.sh: line 140: ./zookeeper.out: Permission denied
STARTED
正在运行HBase:
/usr/local/hadoop-3.1.2/libexec/hadoop-functions.sh: line 2358: HADOOP_ORG.APACHE.HADOOP.HBASE.UTIL.GETJAVAPROPERTY_USER: bad substitution
/usr/local/hadoop-3.1.2/libexec/hadoop-functions.sh: line 2453: HADOOP_ORG.APACHE.HADOOP.HBASE.UTIL.GETJAVAPROPERTY_OPTS: bad substitution
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hadoop-3.1.2/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hbase-2.1.2/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.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 /usr/local/hbase-2.1.2/logs/hbase-saeed-master-machine-a.out
/usr/local/hadoop-3.1.2/libexec/hadoop-functions.sh: line 2358: HADOOP_ORG.APACHE.HADOOP.HBASE.UTIL.GETJAVAPROPERTY_USER: bad substitution
/usr/local/hadoop-3.1.2/libexec/hadoop-functions.sh: line 2453: HADOOP_ORG.APACHE.HADOOP.HBASE.UTIL.GETJAVAPROPERTY_OPTS: bad substitution
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hadoop-3.1.2/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hbase-2.1.2/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.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]
saeed@machine-b: running regionserver, logging to /usr/local/hbase-2.1.2/bin/../logs/hbase-saeed-regionserver-machine-b.out
saeed@machine-a: running regionserver, logging to /usr/local/hbase-2.1.2/bin/../logs/hbase-saeed-regionserver-machine-a.out
尝试启动hbase时显示类似的日志。当我查看主日志时,可能会看到以下内容:
2020-05-25 16:18:20,529错误[master / VB-hbase:16000:becomeActiveMaster] master.HMaster:*****中止master vb-hbase,16000,1590403688901:未处理的异常。开始关机。 *****java.lang.IllegalStateException:过程WAL依赖于在组件故障期间进行hsync进行正确操作的能力,但是基础文件系统不支持这样做。请检查'hbase.procedure.store.wal.use.hsyn c的配置值,以设置所需的鲁棒性级别,并确保'hbase.wal.dir'的配置值指向可以提供。
然后我跟随了steps here
显然,可能没有直接链接到我们看到的错误的错误信息,因为在启动过程中记录了无效变量,而主服务器没有出现,因为我仍然可以看到错误,但到目前为止一切正常。