gpt4 book ai didi

hadoop - 本地文件系统上的独立 HBase 出现 zookeeper 错误?

转载 作者:可可西里 更新时间:2023-11-01 15:16:13 24 4
gpt4 key购买 nike

大家好,我正在尝试关注 quick start of HBase并在本地文件系统上启动 HBase(不使用 HDFS)但是,当我使用 ./hbase shell 启动 shell 并键入“status”时,出现 zookeeper 错误?!

hbase(main):001:0> status
14/01/07 12:44:48 ERROR zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 3 retries
14/01/07 12:44:48 WARN zookeeper.ZKUtil: hconnection Unable to set watcher on znode (/hbase/hbaseid)
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/hbaseid

//......... ect .....

这是我的配置文件(hbase-site.xml)

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
/**
* Copyright 2010 The Apache Software Foundation
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<configuration>


<property>
<name>hbase.rootdir</name>
<value>file:///home/adio/workspace/hadoop/hbase/directories/hbase</value>
</property>

<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/adio/workspace/hadoop/hbase/directories/zookeeper</value>
</property>

<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
<description>Comma separated list of servers in the ZooKeeper Quorum.
For example, "host1.mydomain.com,host2.mydomain.com,host3.mydomain.com".
By default this is set to localhost for local and pseudo-distributed modes
of operation. For a fully-distributed setup, this should be set to a full
list of ZooKeeper quorum servers. If HBASE_MANAGES_ZK is set in hbase-env.sh
this is the list of servers which we will start/stop ZooKeeper on.
</description>
</property>

<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2222</value>
<description>Property from ZooKeeper's config zoo.cfg.
The port at which the clients will connect.
</description>
</property>



<property>
<name>hbase.zookeeper.property.maxClientCnxns</name>
<value>1000</value>
<description>
</description>
</property>
</configuration>

有什么建议吗?

最佳答案

问题出在这里(在您的 conf - conf/hbase-site.xml 中):

<name>hbase.zookeeper.quorum</name>
<value>localhost</value>

由于错误“ERROR zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 3 retries”表明您的 zookeeper.quorum 指令存在问题。或者在启动 HBase shell 之前,您可以验证 ZKQuorum 是否已启动,使用:

$ jps

该命令将列出机器上的所有 java 进程,即可能的输出必须是:

62019 Jps
61098 HMaster
61233 HRegionServer
61003 HQuorumPeer

解决方案:

在你的HBase目录下,先停止HBase:

$ ./bin/stop-hbase.sh

如果您正在尝试解决“独立 HBase”示例 - 请坚持示例中提供的最低配置:

<configuration>
<property>
<name>hbase.rootdir</name>
<value>file:///home/adio/workspace/hadoop/hbase/directories/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/adio/workspace/hadoop/hbase/directories/zookeeper</value>
</property>
</configuration>

即你的 conf/hbase-site.xml 应该有上面的内容。

设置好后,再次启动HBase:

$ ./bin/start-hbase.sh

关于hadoop - 本地文件系统上的独立 HBase 出现 zookeeper 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20969677/

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