hbase外壳程序无法使用:错误:keeperrorCode=NoNode for/hbase/master
我尝试在hbase外壳程序无法使用:错误:keeperrorCode=NoNode for/hbase/master,hbase,apache-zookeeper,master,Hbase,Apache Zookeeper,Master,我尝试在伪分布式模式下安装hbase。由于这个问题,我现在无法使用hbase。hbaseshell中的每个代码都无法运行,并且所有代码都会收到以下错误提示: 错误:keeperrorcode=NoNode for/hbase/master 在我的ubuntu 17中,我安装了hadoop,我确信我的hdfs位置与我的hbase匹配: hdfs://localhost:9000 这是我的hbase-site.xml中的hbase-config: <configuration> <
伪分布式
模式下安装hbase
。由于这个问题,我现在无法使用hbase。hbase
shell中的每个代码都无法运行,并且所有代码都会收到以下错误提示:
错误:keeperrorcode=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>
<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>
我可以启动hbase
,但过了一会儿,HMaster
就不见了:
6737 DataNode
7749 HRegionServer
6582 NameNode
6968 SecondaryNameNode
7529 HQuorumPeer
9148 Jps
登录http://localhost:16010/master-状态
,可以查看日志:
未能激活:该过程依赖于在组件故障期间正确操作hsync的能力,但底层文件系统不支持这样做。请检查“hbase.procedure.store.wal.use.hsync”的配置值,以设置所需的健壮性级别,并确保“hbase.wal.dir”的配置值指向可以提供它的文件系统装载。(从2秒前开始)
确保您的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.unsafe.stream.capability.enforce
假的
zookeeper.znode.parent
/糖化血红蛋白
如果这仍然不能解决问题,请注意hbase日志文件中的条目。在使用hbase独立模式时,我也遇到了相同的问题。
jps
能够列出HMaster
服务,但当我启动“hbase shell
”并发出任何命令时,它抛出错误:keeperrorcode=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中嵌入的ZK服务-
# 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>
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似乎有一些问题
希望它能帮助别人 在我的例子中,我收到这个“错误:keeperrorcode=NoNode for/hbase/master
”,因为HMaster进程没有运行。正如你提到的,你的HMaster也没有运行
我在您的hbase-site.xml中没有看到hbase.zookeeper.quorum
属性。添加它并检查
<property>
<name>hbase.zookeeper.quorum</name>
<value>hdp-master-1</value>
</property>
我通过在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
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
中的hdfs端口不同
回答。我在最近的HBase 2.x测试版中遇到了类似的问题,而在稳定的1.x版本中一切正常。你在使用2.x测试版吗?是的,我想这是由发布问题引起的
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