HBase Shell - org.apache.hadoop.hbase.ipc.ServerNotRunningYetException:服务器尚未运行
Posted
技术标签:
【中文标题】HBase Shell - org.apache.hadoop.hbase.ipc.ServerNotRunningYetException:服务器尚未运行【英文标题】:HBase Shell - org.apache.hadoop.hbase.ipc.ServerNotRunningYetException: Server is not running yet 【发布时间】:2021-12-29 18:41:08 【问题描述】:我正在尝试在 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
但它也不起作用。
我需要帮助,因为我真的没有什么好主意了......
提前致谢
【问题讨论】:
【参考方案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 就可以了。以上是关于HBase Shell - org.apache.hadoop.hbase.ipc.ServerNotRunningYetException:服务器尚未运行的主要内容,如果未能解决你的问题,请参考以下文章
for usage try ‘help “create“‘——Hbase使用shell无法创建表格解决办法
扫描仪和计数调用上的 HBase shell“OutOfOrderScannerNextException”错误
Hbase使用shell命令出现报错:PleaseHoldException: Master is initializing 解决办法
Hbase使用shell命令出现报错:PleaseHoldException: Master is initializing 解决办法
hbase报错org.apache.hadoop.hbase.TableExistsException: hbase:namespace
hbase报错 ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing