本地文件系统上的独立 HBase 出现 zookeeper 错误? [英] Stand alone HBase on local file system getting zookeeper error?

查看:29
本文介绍了本地文件系统上的独立 HBase 出现 zookeeper 错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我正在尝试按照 快速启动 HBase 并启动 HBase在本地文件系统上(不使用 HDFS)但是,当我使用 ./hbase shell 启动 shell 并键入status"时,出现 zookeeper 错误?!

hbase(main):001:0>地位14/01/07 12:44:48 错误 zookeeper.RecoverableZooKeeper:3 次重试后,ZooKeeper 存在失败14/01/07 12:44:48 WARN zookeeper.ZKUtil: hconnection 无法在 znode (/hbase/hbaseid) 上设置观察者org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for/hbase/hbaseid//…………等等……

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

<?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!--/*** 版权所有 2010 Apache 软件基金会** 授权给 Apache 软件基金会 (ASF) 一份* 或更多贡献者许可协议.查看通知文件* 随本作品一起分发以获取更多信息* 关于版权所有权.ASF 许可此文件* 根据 Apache 许可,版本 2.0(* 执照");除非合规,否则您不得使用此文件* 带有许可证.您可以在以下网址获取许可证副本** http://www.apache.org/licenses/LICENSE-2.0** 除非适用法律要求或书面同意,否则软件* 根据许可证分发是按原样"分发的,* 没有任何形式的明示或暗示的保证或条件.* 请参阅许可证以了解管理权限的特定语言和* 许可下的限制.*/--><配置><财产><name>hbase.rootdir</name><value>file:///home/adio/workspace/hadoop/hbase/directories/hbase</value></属性><财产><name>hbase.zookeeper.property.dataDir</name><value>/home/adio/workspace/hadoop/hbase/directories/zookeeper</value></属性><财产><name>hbase.zookeeper.quorum</name><value>本地主机</value> 逗号分隔的 ZooKeeper Quorum 中的服务器列表.例如,host1.mydomain.com,host2.mydomain.com,host3.mydomain.com".默认情况下,对于本地和伪分布式模式,这设置为 localhost的操作.对于完全分布式设置,这应该设置为完整ZooKeeper 仲裁服务器列表.如果在 hbase-env.sh 中设置了 HBASE_MANAGES_ZK这是我们将在其上启动/停止 ZooKeeper 的服务器列表.</描述></属性><财产><name>hbase.zookeeper.property.clientPort</name><value>2222</value> 属性来自 ZooKeeper 的配置 zoo.cfg.客户端将连接的端口.</描述></属性><财产><name>hbase.zookeeper.property.maxClientCnxns</name><value>1000</value><说明></描述></属性></配置>

有什么建议吗?

解决方案

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

hbase.zookeeper.quorum<value>本地主机</value>

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

$ jps

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

62019 日元61098 HMaster61233 HRegionServer61003 HQuorumPeer

<小时>

解决方案:

在你的 HBase 目录中,首先停止 HBase:

$ ./bin/stop-hbase.sh

如果您正在尝试制定独立 HBase"示例 - 坚持示例中提供的最低配置:

<预><代码><配置><财产><name>hbase.rootdir</name><value>file:///home/adio/workspace/hadoop/hbase/directories/hbase</value></属性><财产><name>hbase.zookeeper.property.dataDir</name><value>/home/adio/workspace/hadoop/hbase/directories/zookeeper</value></属性></配置>

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

一旦设置,现在再次启动 HBase:

$ ./bin/start-hbase.sh

Hi guys I am trying to follow the quick start of HBase and start an HBase on the local file system( without using HDFS ) However when I start the shell using ./hbase shell and type "status" I get zookeeper error ?!

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 ..... 

Here is my config file ( 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>

Any suggestions ?

解决方案

The problem is here (in your conf - conf/hbase-site.xml):

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

As the error "ERROR zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 3 retries" indicates there is some problem with your zookeeper.quorum directive. Or Before staring the HBase shell you can verify if the ZKQuorum is up, using:

$ jps

the command will list all the java processes on the machine i.e. the probable output has to be:

62019 Jps
61098 HMaster        
61233 HRegionServer     
61003 HQuorumPeer


Solution:

In your HBase directory, first stop the HBase:

$ ./bin/stop-hbase.sh

If you're trying to work out the 'standalone HBase' example - stick to the minimum conf provided in the example:

<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>

i.e. your conf/hbase-site.xml should have the above content.

Once set, now start the HBase again:

$ ./bin/start-hbase.sh

这篇关于本地文件系统上的独立 HBase 出现 zookeeper 错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆