【问题标题】:HMaster process doesn't run on hadoop multi-node cluster after HBase installationHBase安装后HMaster进程不在hadoop多节点集群上运行
【发布时间】:2019-07-03 15:06:11
【问题描述】:

我在两个 ubuntu 虚拟机之上安装了一个 hadoop 多节点集群。

在下一步中,我尝试在此虚拟集群上安装 HBase。但是当我使用 start-hbase.sh 运行 HBase 时,HMaster 没有在 master 上运行,尽管 HRegionServer 已经在 master 和 slave 机器上正确运行。

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 版本回滚到 2.0.4。让它首先工作。
  • 我认为您需要先删除 CLASSPATH 中的冗余文件。用 sudo rm /usr/local/hbase-2.1.2/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar 然后看看发生了什么。

标签: hadoop hbase apache-zookeeper


【解决方案1】:

我在尝试启动 hbase 时出现了类似的日志。 当我查看主日志时,可以看到以下内容:

2020-05-25 16:18:20,529 错误 [master/VB-hbase:16000:becomeActiveMaster] master.HMaster: ***** ABORTING master vb-hbase,16000,1590403688901:未处理的异常。开始关机。 ***** java.lang.IllegalStateException:过程 WAL 依赖于在组件故障期间进行正确操作的 hsync 能力,但底层文件系统不支持这样做。请检查 'hbase.procedure.store.wal.use.hsync' 的配置值以设置所需的稳健性级别并确保 'hbase.wal.dir' 的配置值指向可以提供它的文件系统挂载。

然后我关注了steps here

显然,我们看到的错误可能没有直接链接,因为在启动期间记录了无效变量并且 master 没有出现,因为我仍然可以看到错误,但到目前为止一切似乎都正常。

【讨论】:

    【解决方案2】:

    这可能有帮助(hbase 2.3.7)

    将此行添加到 /etc/profile( 或 ~/.bashrc) 然后来源 /etc/profile

    export HBASE_DISABLE_HADOOP_CLASSPATH_LOOKUP=true
    

    在$HBASE_HOME/bin/hbase,有这样的代码

    #If avail, add Hadoop to the CLASSPATH and to the JAVA_LIBRARY_PATH
    # Allow this functionality to be disabled
    if [ "$HBASE_DISABLE_HADOOP_CLASSPATH_LOOKUP" != "true" ] ; then
        HADOOP_IN_PATH=$(PATH="${HADOOP_HOME:-${HADOOP_PREFIX}}/bin:$PATH"  which hadoop 2>/dev/null)
    fi
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多