복붙노트

[HADOOP] 사육사 오류가 발생하는 로컬 파일 시스템에 HBase를 사용 하시겠습니까?

HADOOP

사육사 오류가 발생하는 로컬 파일 시스템에 HBase를 사용 하시겠습니까?

안녕하세요 저는 HBase의 빠른 시작을 따르고 (HDFS를 사용하지 않고) 로컬 파일 시스템에서 HBase를 시작하려고합니다. 그러나 ./hbase 쉘을 사용하여 쉘을 시작하고 "상태"를 입력하면 사육사 오류가 발생합니다.

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>

어떤 제안?

해결법

  1. ==============================

    1.사육사 정족수 이름은 시스템의 호스트 이름이어야하며 / etc / hosts 파일에도 있어야합니다. 이 후에 네트워크를 다시 시작하십시오.

    사육사 정족수 이름은 시스템의 호스트 이름이어야하며 / etc / hosts 파일에도 있어야합니다. 이 후에 네트워크를 다시 시작하십시오.

  2. ==============================

    2.문제는 conf-conf / hbase-site.xml에있다.

    문제는 conf-conf / hbase-site.xml에있다.

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

    "EROOR zookeeper.RecoverableZooKeeper : 3 번의 재시도 후 ZooKeeper가 실패했습니다"라는 메시지는 zookeeper.quorum 지시문에 문제가 있음을 나타냅니다. 또는 HBase 셸을 시작하기 전에 다음을 사용하여 ZKQuorum이 가동 중인지 확인할 수 있습니다.

    $ jps
    

    명령은 기계의 모든 Java 프로세스를 나열합니다. 즉, 가능한 출력은 다음과 같아야합니다.

    62019 Jps
    61098 HMaster        
    61233 HRegionServer     
    61003 HQuorumPeer
    

    해결책:

    HBase 디렉토리에서 먼저 HBase를 중지하십시오.

    $ ./bin/stop-hbase.sh
    

    '독립형 HBase'예제를 작성하려는 경우 - 예제에 제공된 최소 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
    
  3. from https://stackoverflow.com/questions/20969677/stand-alone-hbase-on-local-file-system-getting-zookeeper-error by cc-by-sa and MIT license