gpt4 book ai didi

hbase shell 不能使用 : ERROR: KeeperErrorCode = NoNode for/hbase/master

转载 作者:行者123 更新时间:2023-12-02 17:08:56 24 4
gpt4 key购买 nike

我尝试在伪分布式模式下安装hbase。现在我不能使用 hbase。 hbase shell 中的所有代码都无法运行,并且所有代码都得到此错误提示:

ERROR: KeeperErrorCode = NoNode for /hbase/master

在我的 ubuntu 17 中,我安装了 hadoop,我确定我的 hdfs 位置与我的 hbase 匹配:

hdfs://localhost:9000

这是我在 hbase-site.xml 中的 hbase-config:

<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>

我的 hdfs-configcore-site.xml 中:

<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>file:/usr/local/hadoop/tmp</value>
<description>A base for other tmp dir</description>
</property>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>

我可以启动 hbase ,但是过了一会儿,HMaster 消失了:

6737 DataNode
7749 HRegionServer
6582 NameNode
6968 SecondaryNameNode
7529 HQuorumPeer
9148 Jps

登录http://localhost:16010/master-status,可以看到日志:

Failed to become active: The procedure WAL relies on the ability to hsync for proper operation during component failures, but the underlying filesystem does not support doing so. Please check the config value of 'hbase.procedure.store.wal.use.hsync' to set the desired level of robustness and ensure the config value of 'hbase.wal.dir' points to a FileSystem mount that can provide it. (since 2sec ago)

最佳答案

我在使用HBase独立模式时也遇到了同样的问题。jps 能够列出 HMaster 服务,但是当我启动“hbase shell”并发出任何命令时,它会抛出 ERROR: KeeperErrorCode = NoNode for/hbase/master 和 HMaster 服务突然终止。所以采用伪分布式的方式使用Hbase。

我正在使用 -

1: Hadoop - 3.2.0

2: Zookeeper - 3.5.5

3: HBase - 2.2.0

1:我已经更改了 hbase-env.sh 中的以下属性,因为我想使用单独的 ZK 服务而不是嵌入在 HBase 中的服务 -

# Tell HBase whether it should manage it's own instance of ZooKeeper or not.
export HBASE_MANAGES_ZK=false

2: 更改了 hbase-site.xml

<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>
<property>
<name>zookeeper.znode.parent</name>
<value>/hbase</value>
</property>
</configuration>

3: start-all.sh4: zkServer.sh 启动5: start-hbase.sh

5: jps能够列出HMaster和HRegionServer

madhuri@**-****:$ jps
10688 HRegionServer
4194 DataNode
4019 NameNode
10532 HMaster
4468 SecondaryNameNode
10309 QuorumPeerMain
4902 NodeManager
11162 Main
11740 Jps
4718 ResourceManager
madhuri@**-****:$

6:查询HBase:

hbase(main):003:0> list
TABLE
mytable
1 row(s)
Took 0.0138 seconds
=> ["mytable"]
hbase(main):004:0> scan 'mytable'
ROW COLUMN+CELL
first column=cf:message, timestamp=1565095359573, value=hello HB
ase
second column=cf:foo, timestamp=1565095375215, value=0
third column=cf:bar, timestamp=1565095394172, value=3.14159
3 row(s)
Took 0.0186 seconds
hbase(main):005:0>

**如果一切顺利,但 hbase shell 返回结果的时间更长,那么请转到 ZK 目录 - 我的目录是 /tmp/zookeeper(它存在于zoo.cfg 文件)并删除所有内容并尝试重新启动上述服务。 ZK好像有点问题。

希望对大家有所帮助!

关于hbase shell 不能使用 : ERROR: KeeperErrorCode = NoNode for/hbase/master,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50229580/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com