【问题标题】:HBase Shell - org.apache.hadoop.hbase.ipc.ServerNotRunningYetException: Server is not running yetHBase Shell - org.apache.hadoop.hbase.ipc.ServerNotRunningYetException:服务器尚未运行
【发布时间】:2023-04-10 22:27:01
【问题描述】:

我正在尝试在 3 个节点上设置分布式 HBase。我已经设置了 hadoop、YARN ZooKeeper 和现在的 HBase,但是当我启动 hbase shell 并运行最简单的命令(例如 status 或 list)时,我得到了异常:

HBase Shell
Use "help" to get list of supported commands.
Use "exit" to quit this interactive shell.
For Reference, please visit: http://hbase.apache.org/2.0/book.html#shell
Version 2.4.8, rf844d09157d9dce6c54fcd53975b7a45865ee9ac, Wed Oct 27 08:48:57 PDT 2021
Took 0.0014 seconds
hbase:001:0> status

ERROR: org.apache.hadoop.hbase.ipc.ServerNotRunningYetException: Server is not running yet
        at org.apache.hadoop.hbase.master.HMaster.checkServiceStarted(HMaster.java:2817)
        at org.apache.hadoop.hbase.master.MasterRpcServices.isMasterRunning(MasterRpcServices.java:1205)
        at org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
        at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:392)
        at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:133)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:354)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:334)

For usage try 'help "status"'

Took 9.0800 seconds

我的 Hadoop Master JPS:

3443 NameNode
13987 Jps
2503 QuorumPeerMain
3754 SecondaryNameNode
4010 ResourceManager
4749 HMaster

和两个节点 JPS:

2135 QuorumPeerMain
6327 HRegionServer
3115 NodeManager
2894 DataNode
6670 Jps

我使用以下 zoo.cfg 启动我自己的 ZooKeeper:

tickTime=2000
dataDir=/usr/local/zookeeper/data
dataLogDir=/usr/local/zookeeper/data
clientPort=2181
initLimit=10
syncLimit=10
server.1=0.0.0.0:2888:3888
server.2=OpenCitation2:2888:3888
server.3=OpenCitation3:2888:3888
4lw.commands.whitelist=stat, ruok, conf, isro



hadoopuser@OpenCitation1:~$ echo ruok | nc OpenCitation1 2181
imok
hadoopuser@OpenCitation1:~$ echo ruok | nc OpenCitation2 2181
imok
hadoopuser@OpenCitation1:~$ echo ruok | nc OpenCitation3 2181
imok

Hbase-site.xml:

      <property>
        <name>hbase.rootdir</name>
        <value>hdfs://OpenCitation1:9000/hbase</value>
      </property>
      <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
      </property>
      <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/usr/local/zookeeper/data</value>
      </property>
      <property>
        <name>hbase.unsafe.stream.capability.enforce</name>
        <value>false</value>
      </property>
      <property>
        <name>hbase.tmp.dir</name>
        <value>/usr/local/HBase/var</value>
      </property>
    <property>
        <name>hbase.zookeeper.property.clientPort</name>
        <value>2181</value>
    </property>

Hbase-env.sh:

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
export HBASE_MANAGES_ZK=false

Hadoop 版本:

hadoopuser@OpenCitation1:~$ hadoop version
Hadoop 3.3.1
Source code repository https://github.com/apache/hadoop.git -r a3b9c37a397ad4188041dd80621bdeefc46885f2
Compiled by ubuntu on 2021-06-15T05:13Z
Compiled with protoc 3.7.1
From source with checksum 88a4ddb2299aca054416d6b7f81ca55
This command was run using /usr/local/hadoop/share/hadoop/common/hadoop-common-3.3.1.jar

Hbase 版本:

hbase:001:0> version
2.4.8, rf844d09157d9dce6c54fcd53975b7a45865ee9ac, Wed Oct 27 08:48:57 PDT 2021
Took 0.0005 seconds

我也尝试过开启安全模式:

hadoopuser@OpenCitation1:~$ hdfs dfsadmin -safemode get
Safe mode is OFF

但它也不起作用。

我需要帮助,因为我真的没有什么好主意了......

提前致谢

【问题讨论】:

    标签: linux hadoop bigdata hbase apache-zookeeper


    【解决方案1】:

    更新:

    我通过将以下属性添加到 hbase-site.xml 解决了这个问题:

    <property>
      <name>hbase.wal.provider</name>
      <value>filesystem</value>
    </property>
    

    现在运行:

    hadoopuser@OpenCitation1:~$ hbase shell
    HBase Shell
    Use "help" to get list of supported commands.
    Use "exit" to quit this interactive shell.
    For Reference, please visit: http://hbase.apache.org/2.0/book.html#shell
    Version 2.4.8, rf844d09157d9dce6c54fcd53975b7a45865ee9ac, Wed Oct 27 08:48:57 PDT 2021
    Took 0.0014 seconds
    hbase:001:0> status
    1 active master, 0 backup masters, 2 servers, 0 dead, 1.0000 average load
    Took 0.4730 seconds
    hbase:002:0>
    

    也许它会帮助某人

    【讨论】:

    • 这也适用于我。只需将属性添加到 hbase-site.xml 就可以了。
    猜你喜欢
    • 1970-01-01
    • 2015-11-17
    • 2020-04-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-07-25
    • 2018-08-09
    • 2016-06-20
    相关资源
    最近更新 更多