我正在使用非托管zookeeper构建一个完全分布式的hbase集群。 我几乎使用了这个例子并在其上面安装了hbase:https://github.com/kiwenlau/hadoop-cluster-docker
Hadoop和hdfs工作正常,但我用hbase:
得到了这个例外2016-09-05 06:27:12,268 INFO [hadoop-master:16000.activeMasterManager] zookeeper.MetaTableLocator: Failed verification of hbase:meta,,1 at address=hadoop-slave2,16020,1473052276351, exception=org.apache.hadoop.hbase.NotServingRegionException: Region hbase:meta,,1 is not online on hadoop-slave2.hadoopnet,16020,1473056813966
at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:2910)
这很闷,因为我在hbase shell上输入的任何命令都会返回以下错误:
ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing
使用--net = hadoopnet运行容器 这是一个网络创建如下:
docker network create --driver=bridge hadoopnet
hbase webui显示了这个:
Region Servers
ServerName Start time Version Requests Per Second Num. Regions
hadoop-slave1,16020,1473056814064 Mon Sep 05 06:26:54 UTC 2016 1.2.2 0 0
hadoop-slave1.hadoopnet,16020,1473056814064 Mon Sep 05 06:26:54 UTC 2016 Unknown 0 0
hadoop-slave2,16020,1473056813966 Mon Sep 05 06:26:53 UTC 2016 1.2.2 0 0
hadoop-slave2.hadoopnet,16020,1473056813966 Mon Sep 05 06:26:53 UTC 2016 Unknown 0 0
Total:4 2 nodes with inconsistent version 0 0
我应该只有2个区域服务器,但是2个奇怪的hadoop-slave1.hadoopnet和hadoop-slave2.hadoopnet被添加到列表中。 当我使用:
查看zk时/usr/local/hbase/bin/hbase zkcli -server zk:2181 ls /hbase/rs
我只看到我的2区域服务器:hadoop-slave1,16020,1473056814064和hadoop-slave2,16020,1473056813966
看看zookeeper.MetaTableLocator:验证失败错误我看到hadoop-slave2,16020,1473052276351和hadoop-slave2.hadoopnet,16020,1473056813966混淆了。
这是我在所有服务器上的配置
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://hadoop-master:9000/hbase</value>
<description>The directory shared by region servers. Should be fully-qualified to include the filesystem to use. E.g: hdfs://NAMENODE_SERVER:PORT/HBASE_ROOTDIR</description>
</property>
<property>
<name>hbase.master</name>
<value>hdfs://hadoop-master:60000</value>
<description>The host and port that the HBase master runs at.</description>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
<description>The mode the cluster will be in. Possible values are
false: standalone and pseudo-distributed setups with managed Zookeeper
true: fully-distributed with unmanaged Zookeeper Quorum (see hbase-env.sh)</description>
</property>
<property>
<name>hbase.master.info.port</name>
<value>60010</value>
<description>The UI interface of HBase master runs.</description>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>zk</value>
<description>string m_e_m_b_e_r_s is replaced by list of hosts separated by comma. Its generated by configure-slaves.sh on master node</description>
</property>
<property>
<name>hbase.zookeeper.property.maxClientCnxns</name>
<value>300</value>
</property>
<property>
<name>hbase.zookeeper.property.datadir</name>
<value>/tmp/zookeeper</value>
<description>location of storage of zookeeper data</description>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
</configuration>
答案 0 :(得分:2)
我遇到同样的问题,如下所示:
我注意到,hbase-1.2.2
将hadoop的jar包含为2.5.1
,将zookeeper&jar的jar包括为3.4.6
,我将它们升级为版本i& #39; m使用(hadoop&amp; zookeeper),错误已经消失,但仍然发现[hostname].[docker-network]
为区域服务器,除此之外,一切都很好。