我试图在hbase模式下安装pseudo-distributed。现在我不能用hbase了。hbase shell中的每一段代码都无法运行,它们都得到了以下错误提示:
错误: 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>我在core-site.xml的hdfs-config:
<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,可以看到日志:
未能激活:过程WAL依赖于在组件故障期间进行适当操作的hsync能力,但底层文件系统不支持这样做。请检查“hbase.procedure.store.wal.use.hsync”的配置值,以设置所需的健壮性级别,并确保“hbase.wal.dir”的配置值指向可以提供该功能的FileSystem挂载。(从2秒前开始)
发布于 2019-08-07 06:25:21
在使用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.01:我在hbase-env.sh中更改了下面的属性,因为我希望使用单独的ZK服务,而不是在HBase中使用嵌入式服务-
# Tell HBase whether it should manage it's own instance of ZooKeeper or not.
export HBASE_MANAGES_ZK=false2:更改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.sh 4:zkServer.sh start 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 diretory -re is /tmp/zookeeper (它在zoo.cfg文件中),删除所有内容并尝试重新启动上述服务。看来ZK有问题了。
希望它能帮到别人!
发布于 2018-09-27 20:03:55
确保您的hbase-site.xml文件中有以下两部分。当我遇到同样的问题时,解决了这些问题:
<configuration>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>
<property>
<name>zookeeper.znode.parent</name>
<value>/hbase</value>
</property>
</configuration>如果这仍然不能解决问题,请注意hbase日志文件中的条目。
发布于 2020-04-23 13:05:58
在我的例子中,我接收到了这个"ERROR: KeeperErrorCode = NoNode for /hbase/master“,因为HMaster进程没有运行。正如您所提到的,您的HMaster也没有运行。
我在hbase-site.xml中看不到hbase.zookeeper.quorum属性。加起来检查一下。
<property>
<name>hbase.zookeeper.quorum</name>
<value>hdp-master-1</value>
</property>如果仍然没有启动HMaster,那么在$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”替换为“我的机器的主机名”来解决这个问题。从这个答案
第二版:
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中的hdfs端口与hadoop的core-site.xml中的不同。
here回答。
https://stackoverflow.com/questions/50229580
复制相似问题