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

查看:160
本文介绍了独立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

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

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

 <?xml version =1.0?> 
<?xml-stylesheet type =text / xslhref =configuration.xsl?>
<! -
/ **
*版权所有2010 The Apache Software Foundation
*
*授权给Apache Software Foundation(ASF) $ b *或更多贡献者许可协议。请参阅此作品发行的NOTICE文件
*以了解有关版权所有权的其他信息
*。 ASF根据Apache许可证2.0版(
*许可证)将此文件
*许可给您;除了符合
*的许可证外,您不得使用此文件。您可以在
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*处获得许可证副本*除非适用法律要求或以书面形式同意,根据许可证分发的软件
*以原样基础,
*分发,不附有任何明示或暗示的保证或条件。
*请参阅许可证以了解许可证下特定语言的管理权限和
*限制。
* /
- >
<配置>


<属性>
<名称> hbase.rootdir< /名称>
< value> file:/// home / adio / workspace / hadoop / hbase / directories / hbase< / value>
< / property>

<属性>
<名称> hbase.zookeeper.property.dataDir< / name>
<值> / home / adio / workspace / hadoop / hbase / directories / zookeeper< /值>
< / property>

<属性>
<名称> hbase.zookeeper.quorum< / name>
<值>本地主机< /值>
< description> ZooKeeper仲裁服务器中的逗号分隔列表。
例如,host1.mydomain.com,host2.mydomain.com,host3.mydomain.com。
默认情况下,对于本地和伪分布式模式
的操作,它被设置为localhost。对于完全分布式设置,应将其设置为ZooKeeper法定服务器的完整
列表。如果在hbase-env.sh
中设置HBASE_MANAGES_ZK,这是我们将启动/停止ZooKeeper的服务器列表。
< / description>
< / property>

<属性>
< name> hbase.zookeeper.property.clientPort< / name>
<值> 2222< /值>
< description>来自ZooKeeper配置zoo.cfg的属性。
客户端将连接的端口。
< / description>
< / property>



<属性>
<名称> hbase.zookeeper.property.maxClientCnxns< / name>
<值> 1000< /值>
< description>
< / description>
< / property>
< / configuration>

有何建议?

解决方案

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

 <名称>&hbase.zookeeper.quorum LT; /名称> 
<值>本地主机< /值>

由于错误错误zookeeper.RecoverableZooKeeper:ZooKeeper在3次重试后失败表示您的 zookeeper.quorum 指令有问题。或者在观看HBase shell之前,您可以使用以下命令验证ZKQuorum是否已启动:

  $ jps 

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

  62019 Jps 
61098 HMaster
61233 HRegionServer
61003 HQuorumPeer






解决方案

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

  $ ./bin/stop-hbase.sh 

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

 < configuration> 
<属性>
<名称> hbase.rootdir< /名称>
< value> file:/// home / adio / workspace / hadoop / hbase / directories / hbase< / value>
< / property>
<属性>
<名称> hbase.zookeeper.property.dataDir< / name>
<值> / home / adio / workspace / hadoop / hbase / directories / zookeeper< /值>
< / property>
< / configuration>

即你的 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天全站免登陆