gpt4 book ai didi

hadoop - Hbase错误 "ERROR: KeeperErrorCode = NoNode for/hbase/master"

转载 作者:可可西里 更新时间:2023-11-01 15:50:06 33 4
gpt4 key购买 nike

在 hbase shell 中执行任何命令时,我在 hbase shell 中收到以下错误“错误:KeeperErrorCode = NoNode for/hbase/master”。

启动 HBASE:

    HOSTCHND:hbase-2.0.0 gvm$ ./bin/start-hbase.sh
localhost: running zookeeper, logging to /usr/local/Cellar/hbase-2.0.0/bin/../logs/hbase-gvm-zookeeper-HOSTCHND.local.out
running master, logging to /usr/local/Cellar/hbase-2.0.0/logs/hbase-gvm-master-HOSTCHND.local.out
: running regionserver, logging to /usr/local/Cellar/hbase-2.0.0/logs/hbase-gvm-regionserver-HOSTCHND.local.out

在 HBASE SHELL 中检查状态时:

    hbase(main):001:0> status

ERROR: KeeperErrorCode = NoNode for /hbase/master

Show cluster status. Can be 'summary', 'simple', 'detailed', or 'replication'. The
default is 'summary'. Examples:

hbase> status
hbase> status 'simple'
hbase> status 'summary'
hbase> status 'detailed'
hbase> status 'replication'
hbase> status 'replication', 'source'
hbase> status 'replication', 'sink'

Took 9.4096 seconds
hbase(main):002:0>

hbase-site.xml

<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/usr/local/Cellar/hbase-2.0.0/hbasestorage/zookeeper</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
</configuration>

请告诉我为什么在执行 hbase 命令时会出现此错误?

最佳答案

在我的例子中,我收到了这个“ERROR: KeeperErrorCode = NoNode for/hbase/master”,因为 HMaster 进程没有运行。

jps命令检查。

hdusr@hdp-master-1:$ jps
27504 Main
32755 DataNode
23316 HQuorumPeer
27957 Jps
646 SecondaryNameNode
27097 HMaster
23609 HRegionServer
1562 Master
1722 Worker
911 ResourceManager
32559 NameNode
1167 NodeManager

如果您在上面的列表中没有看到 HMaster 进程,那么这就是在 hbase shell 中出现 ERROR: KeeperErrorCode = NoNode. 的原因。

$HBASE_HOME/logs 目录中检查 hbase-***-master.log 是否有特定错误。

在我的例子中有两个原因,

首先:

WARN  [main-SendThread(localhost:2181)] zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection timed out

我通过在 hbase-site.xml 中将“localhost”替换为“我的机器的主机名”来解决这个问题。来自这个answer

第二:

    ERROR [master/spark-hdp-master-1:16000:becomeActiveMaster] master.HMaster: Failed to become active masterorg.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): org.apache.hadoop.security.AccessControlException: SIMPLE authentication is not enabled.  Available:[TOKEN]

这是因为hbase-site.xml中的hdfs端口与hadoop的core-site.xml中的不同。

关于hadoop - Hbase错误 "ERROR: KeeperErrorCode = NoNode for/hbase/master",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50621931/

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