在执行hbase中的任何命令时,我在hbase中收到以下错误" error : 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外壳中检查状态时的 :
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命令时会发生此错误?
发布于 2020-04-23 12:45:37
在我的例子中,我接收到了这个"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 process,那么这就是hbase shell中ERROR: KeeperErrorCode = NoNode.的原因。
在$HBASE_HOME/logs目录中,检查hbase-***-master.log是否有特定错误。
就我而言,有两个原因,
First :
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。
发布于 2018-09-27 10:57:38
将这些配置替换或添加到hbase dir的conf文件夹中的hbase-site.xml文件中,然后重新运行"hbase shell“命令,然后重新运行"list”命令来查看当前的表。
<?xml version="1.0" encoding="utf-8" ?>
<!--Keeper Error fix-->
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:8020/hbase</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2182</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/var/lib/hbase/zookeeper</value>
</property>
</configuration>发布于 2018-06-01 16:41:48
首先,确保已在主机文件中设置了IP和主机名映射。
其次,修改HBase临时目录位置。临时目录数据将定期清空。临时目录的默认设置在/tmp上,在hbase-site.xml中更改它们
<property>
<name>hbase.tmp.dir</name>
<value>/hbase/tmp</value>
<description>Temporary directory on the local filesystem.</description>
</property>如果不管用的话。清理hbase数据目录,同时在动物园管理员重新启动hbase时清除元数据。
更重要的是,检查您的ntp和防火墙。
https://stackoverflow.com/questions/50621931
复制相似问题