错误 - 试图在伪分布式模式下运行hbase? [英] Errors - trying to run hbase in pseudodistributed mode?

查看:155
本文介绍了错误 - 试图在伪分布式模式下运行hbase?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试以伪分布模式运行hbase时出现以下错误:

 错误:KeeperErrorCode = NoNode for / hbase / backup -masters / VirtualBox,43390,137692277602 
错误:KeeperErrorCode = NodeExists for / hbase / online-snapshot / acquire
错误:KeeperErrorCode = NoNode for / hbase / online-snapshot
错误:KeeperErrorCode = NoNode for / hbase / root-region-server
错误:KeeperErrorCode = NoNode for / hbase / table92 / -ROOT-2013-08-19 16:38:34,281 WARN

以及以下例外情况

  org.apache.hadoop .hbase.client.RetriesExhaustedException 
org.apache.zookeeper.server.NIOServerCnxn:捕获流异常终止

Hbase-site.xml

 < configuration> 
<属性>
<名称> hbase.rootdir< /名称>
<值> hdfs:// localhost:54310 / hbase< /值>
< / property>
<属性>
<名称> hbase.zookeeper.quorum< / name>
<值>本地主机< /值>
< / property>
<属性>
<名称> hbase.zookeeper.distributed< /名称>
<值> true< /值>
< / property>
< / configuration>

hbase-env.sh看起来像

 
#/ **
#*版权所有2007 The Apache Software Foundation
#*
#*授权给Apache Software Foundation (ASF)在
#*或更多贡献者许可协议下。请参阅本作品发布的NOTICE文件
#*以获取有关版权所有权的其他信息
#*。 ASF根据Apache许可证2.0版(
#*许可证)向您授予此文件
#*;除了符合
#*的许可证外,您不得使用此文件。您可以在
#*
#* http://www.apache.org/licenses/LICENSE-2.0
#*
#*获得许可证副本。*除非需要根据适用法律或书面同意,根据许可分发的软件
#*按原样基础,
#*分发,不附有任何种类的明示或暗示保证或条件。
#*请参阅许可证,了解许可证下特定语言的管理权限和
#*限制。
#* /

#在这里设置环境变量。

#这个脚本在启动hbase过程的过程中多次设置变量
#,所以尽量让事情变得幂等,除非你想更深入地观察
#into启动脚本(bin / hbase等)

#使用的java实现。需要Java 1.6。
export JAVA_HOME = / usr / lib / jvm / jdk1.7.0_25

#额外的Java CLASSPATH元素。可选的。
#export HBASE_CLASSPATH = / home / hduser / Desktop / hbase-0.94.10

#使用的堆的最大数量,以MB为单位。默认值为1000.
export HBASE_HEAPSIZE = 400

#额外的Java运行时选项。
#以下是我们默认设置的内容。可能只适用于SUN JVM。
#更多关于为什么以及其他可能的设置,
#请参阅http://wiki.apache.org/hadoop/PerformanceTuning
export HBASE_OPTS = - XX:+ UseConcMarkSweepGC

#取消注释以下三个选项之一,以便为服务器端进程启用Java垃圾回收日志记录。

#这使基本的gc可以记录到.out文件。
#export SERVER_GC_OPTS = - verbose:gc -XX:+ PrintGCDetails -XX:+ PrintGCDateStamps

#这使基本的gc记录到自己的文件中。
#如果未替换FILE-PATH,日志文件(.gc)仍将在HBASE_LOG_DIR中生成。
#export SERVER_GC_OPTS = - verbose:gc -XX:+ PrintGCDetails -XX:+ PrintGCDateStamps -Xloggc:< FILE-PATH>

#这使基本的GC日志记录自动进行日志滚动。仅适用于jdk 1.6.0_34 +和1.7.0_2 +。
#如果未替换FILE-PATH,日志文件(.gc)仍将在HBASE_LOG_DIR中生成。
#export SERVER_GC_OPTS = - verbose:gc -XX:+ PrintGCDetails -XX:+ PrintGCDateStamps -Xloggc:< FILE-PATH> -XX:+ UseGCLogFileRotation -XX:NumberOfGCLogFiles = 1 -XX:GCLogFileSize = 512M

#取消注释以下三个选项之一以启用客户端进程的Java垃圾回收日志记录。

#这使基本的gc可以记录到.out文件。
#export CLIENT_GC_OPTS = - verbose:gc -XX:+ PrintGCDetails -XX:+ PrintGCDateStamps

#这使基本的gc可以记录到自己的文件中。
#如果未替换FILE-PATH,日志文件(.gc)仍将在HBASE_LOG_DIR中生成。
#export CLIENT_GC_OPTS = - verbose:gc -XX:+ PrintGCDetails -XX:+ PrintGCDateStamps -Xloggc:< FILE-PATH>

#这使基本的GC日志记录自动进行日志滚动。仅适用于jdk 1.6.0_34 +和1.7.0_2 +。
#如果未替换FILE-PATH,日志文件(.gc)仍将在HBASE_LOG_DIR中生成。
#export CLIENT_GC_OPTS = - verbose:gc -XX:+ PrintGCDetails -XX:+ PrintGCDateStamps -Xloggc:< FILE-PATH> -XX:+ UseGCLogFileRotation -XX:NumberOfGCLogFiles = 1 -XX:GCLogFileSize = 512M

#如果您打算使用EXPERIMENTAL off堆缓存,请在下面取消注释。
#export HBASE_OPTS =$ HBASE_OPTS -XX:MaxDirectMemorySize =
#将hbase-site.xml中的hbase.offheapcache.percentage设置为非零值。


#取消注释并调整以启用JMX导出
#请参阅$ JRE_HOME / lib / management中的jmxremote.password和jmxremote.access以配置远程密码访问。
#更多详情请访问:http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html

#export HBASE_JMX_BASE = - Dcom .sun.management.jmxremote.ssl = false -Dcom.sun.management.jmxremote.authenticate = false
#export HBASE_MASTER_OPTS =$ HBASE_MASTER_OPTS $ HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port = 10101
#export HBASE_REGIONSERVER_OPTS =$ HBASE_REGIONSERVER_OPTS $ HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port = 10102
#export HBASE_THRIFT_OPTS =$ HBASE_THRIFT_OPTS $ HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port = 10103
#export HBASE_ZOOKEEPER_OPTS =$ HBASE_ZOOKEEPER_OPTS $ HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port = 10104

#HRegionServers将在其上运行的文件命名主机。 $ HBASE_HOME / conf / regionservers默认情况下。
export HBASE_REGIONSERVERS = / home / hduser / Desktop / hbase-0.94.10 / conf / regionservers

#备份HMaster将运行的文件命名主机。 $ HBASE_HOME / conf / backup-master默认情况下。
#export HBASE_BACKUP_MASTERS = $ {HBASE_HOME} / conf / backup-masters

#额外的ssh选项。默认情况下为空。
#export HBASE_SSH_OPTS = - o ConnectTimeout = 1 -o SendEnv = HBASE_CONF_DIR

#存储日志文件的位置。 $ HBASE_HOME / logs默认情况下。
export HBASE_LOG_DIR = / home / hduser / Desktop / hbase-0.94.10 / logs

启用主要HBase进程的远程JDWP调试。对于核心开发人员
#export HBASE_MASTER_OPTS =$ HBASE_MASTER_OPTS -Xdebug -Xrunjdwp:transport = dt_socket,server = y,suspend = n,address = 8070
#export HBASE_REGIONSERVER_OPTS =$ HBASE_REGIONSERVER_OPTS -Xdebug - Xrunjdwp:transport = dt_socket,server = y,suspend = n,address = 8071
#export HBASE_THRIFT_OPTS =$ HBASE_THRIFT_OPTS -Xdebug -Xrunjdwp:transport = dt_socket,server = y,suspend = n,address = 8072
#export HBASE_ZOOKEEPER_OPTS =$ HBASE_ZOOKEEPER_OPTS -Xdebug -Xrunjdwp:transport = dt_socket,server = y,suspend = n,address = 8073

#表示这个hbase实例的字符串。 $ USER默认。
#export HBASE_IDENT_STRING = $ USER

#守护进程的调度优先级。看到'好人'。
#export HBASE_NICENESS = 10

#存储pid文件的目录。 / tmp默认情况下。
export HBASE_PID_DIR = / home / hduser / Desktop / hbase-0.94.10 / pids

#从服务器命令之间的睡眠时间。取消默认设置。这个
#在大型集群中很有用,例如,slave rsyncs可以
#以比主服务器更快的速度到达。
#export HBASE_SLAVE_SLEEP = 0.1

#告诉HBase它是否应该管理它自己的Zookeeper实例。
export HBASE_MANAGES_ZK = true

我的/ etc / hosts有以下内容

  127.0.0.1 localhost.localdomain localhost 
:: 1 localhost6.localdomain6 localhost6
127.0.1.1 VirtualBox
#对于支持IPv6的主机,以下几行是可取的:
#:: 1 ip6-localhost ip6-loopback
#fe00 :: 0 ip6-localnet
#ff00 :: 0 ip6-mcastprefix
#ff02 :: 1 ip6-allnodes
#ff02 :: 2 ip6-allrouters


解决方案

在您的/ etc / hosts中您拥有的配置

make

127.0.1.1 HBase客户端上的localhost



因为这个ip,你正面临着这个问题。尝试在(Ubuntu)/ etc / network / interfaces文件中使用适当的网关,子掩码号码等来配置真实ip


I have the following errors while trying to run hbase in pseudodistributed mode

Error:KeeperErrorCode = NoNode for /hbase/backup-masters/VirtualBox,43390,137692277602
Error:KeeperErrorCode = NodeExists for /hbase/online-snapshot/acquired 
Error:KeeperErrorCode = NoNode for /hbase/online-snapshot
Error:KeeperErrorCode = NoNode for /hbase/root-region-server
Error:KeeperErrorCode = NoNode for /hbase/table92/-ROOT-2013-08-19 16:38:34,281 WARN

and following exceptions

org.apache.hadoop.hbase.client.RetriesExhaustedException
org.apache.zookeeper.server.NIOServerCnxn:caught end of stream exception

Hbase-site.xml

<configuration>
    <property>
        <name>hbase.rootdir</name>
        <value>hdfs://localhost:54310/hbase</value>
        </property>
    <property>
        <name>hbase.zookeeper.quorum</name>
        <value>localhost</value>
    </property>
    <property>
        <name>hbase.zookeeper.distributed</name>
        <value>true</value>
    </property>
</configuration> 

The hbase-env.sh looks like

#
#/**
# * Copyright 2007 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.
# */

# Set environment variables here.

# This script sets variables multiple times over the course of starting an hbase process,
# so try to keep things idempotent unless you want to take an even deeper look
# into the startup scripts (bin/hbase, etc.)

# The java implementation to use.  Java 1.6 required.
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_25

# Extra Java CLASSPATH elements.  Optional.
#export HBASE_CLASSPATH=/home/hduser/Desktop/hbase-0.94.10

# The maximum amount of heap to use, in MB. Default is 1000.
export HBASE_HEAPSIZE=400

# Extra Java runtime options.
# Below are what we set by default.  May only work with SUN JVM.
# For more on why as well as other possible settings,
# see http://wiki.apache.org/hadoop/PerformanceTuning
export HBASE_OPTS="-XX:+UseConcMarkSweepGC"

# Uncomment one of the below three options to enable java garbage collection logging for the server-side processes.

# This enables basic gc logging to the .out file.
# export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps"

# This enables basic gc logging to its own file.
# If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
# export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH>"

# This enables basic GC logging to its own file with automatic log rolling. Only applies to jdk 1.6.0_34+ and 1.7.0_2+.
# If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
# export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH> -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=512M"

# Uncomment one of the below three options to enable java garbage collection logging for the client processes.

# This enables basic gc logging to the .out file.
# export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps"

# This enables basic gc logging to its own file.
# If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
# export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH>"

# This enables basic GC logging to its own file with automatic log rolling. Only applies to jdk 1.6.0_34+ and 1.7.0_2+.
# If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
# export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH> -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=512M"

# Uncomment below if you intend to use the EXPERIMENTAL off heap cache.
# export HBASE_OPTS="$HBASE_OPTS -XX:MaxDirectMemorySize="
# Set hbase.offheapcache.percentage in hbase-site.xml to a nonzero value.


# Uncomment and adjust to enable JMX exporting
# See jmxremote.password and jmxremote.access in $JRE_HOME/lib/management to configure remote password access.
# More details at: http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html
#
# export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
# export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10101"
# export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10102"
# export HBASE_THRIFT_OPTS="$HBASE_THRIFT_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10103"
# export HBASE_ZOOKEEPER_OPTS="$HBASE_ZOOKEEPER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10104"

# File naming hosts on which HRegionServers will run.  $HBASE_HOME/conf/regionservers by default.
export HBASE_REGIONSERVERS=/home/hduser/Desktop/hbase-0.94.10/conf/regionservers

# File naming hosts on which backup HMaster will run.  $HBASE_HOME/conf/backup-masters by default.
# export HBASE_BACKUP_MASTERS=${HBASE_HOME}/conf/backup-masters

# Extra ssh options.  Empty by default.
# export HBASE_SSH_OPTS="-o ConnectTimeout=1 -o SendEnv=HBASE_CONF_DIR"

# Where log files are stored.  $HBASE_HOME/logs by default.
export HBASE_LOG_DIR=/home/hduser/Desktop/hbase-0.94.10/logs

# Enable remote JDWP debugging of major HBase processes. Meant for Core Developers 
# export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8070"
# export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8071"
# export HBASE_THRIFT_OPTS="$HBASE_THRIFT_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8072"
# export HBASE_ZOOKEEPER_OPTS="$HBASE_ZOOKEEPER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8073"

# A string representing this instance of hbase. $USER by default.
# export HBASE_IDENT_STRING=$USER

# The scheduling priority for daemon processes.  See 'man nice'.
# export HBASE_NICENESS=10

# The directory where pid files are stored. /tmp by default.
export HBASE_PID_DIR=/home/hduser/Desktop/hbase-0.94.10/pids

# Seconds to sleep between slave commands.  Unset by default.  This
# can be useful in large clusters, where, e.g., slave rsyncs can
# otherwise arrive faster than the master can service them.
# export HBASE_SLAVE_SLEEP=0.1

# Tell HBase whether it should manage it's own instance of Zookeeper or not.
export HBASE_MANAGES_ZK=true

My /etc/hosts has the following content

127.0.0.1       localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
127.0.1.1       VirtualBox
# The following lines are desirable for IPv6 capable hosts
#::1     ip6-localhost ip6-loopback
#fe00::0 ip6-localnet
#ff00::0 ip6-mcastprefix
#ff02::1 ip6-allnodes
#ff02::2 ip6-allrouters

解决方案

in your /etc/hosts what configuration you have

make

127.0.1.1 localhost on HBase client

Because of this ip's you are facing this problem. 127.0.0.1 127.0.1.1

try to configure real ip with proper gateway, submask number etc in(Ubuntu) /etc/network/interfaces file

这篇关于错误 - 试图在伪分布式模式下运行hbase?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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