大家好我试图关注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>
有什么建议吗?
答案 0 :(得分:1)
您的zookeeper仲裁名称必须是您计算机的主机名,并且还必须存在于/ etc / hosts文件中。在此之后尝试重新启动网络。
答案 1 :(得分:1)
问题出在这里(在你的conf - conf/hbase-site.xml
中):
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
错误&#34; ERROR zookeeper.RecoverableZooKeeper:3次重试后ZooKeeper存在失败&#34;表示您的zookeeper.quorum
指令存在问题。或者在启动HBase shell之前,您可以使用以下命令验证ZKQuorum是否已启动:
$ jps
该命令将列出机器上的所有java进程,即可能的输出必须是:
62019 Jps
61098 HMaster
61233 HRegionServer
61003 HQuorumPeer
<强>解决方案强>:
在HBase目录中,首先停止HBase:
$ ./bin/stop-hbase.sh
如果你正试图找出独立的HBase&#39;示例 - 坚持示例中提供的最小conf:
<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