不启动不同的区域服务器,因为 hbase.cluster.distributed 是错误的

Not starting a distinct region server because hbase.cluster.distributed is false

我在 HBase RegionServer 的日志中收到 Not starting a distinct region server because hbase.cluster.distributed is false,尽管我设置了:

<property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
</property>

在我的 2 节点 HBase 集群中。

我很确定这是一个 /etc/hosts/ 问题。这是我的完整配置:

<configuration>
<property>
    <name>hbase.master</name>
    <value>hbase-master:60000</value>
</property>
<property>
    <name>hbase.rootdir</name>
    <value>hdfs://hadoop-namenode:8020/hbase</value>
</property>
<property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
</property>
<property>
    <name>hbase.zookeeper.quorum</name>
    <value>hbase-master</value>
</property>
<property>
    <name>hbase.zookeeper.property.clientPort</name>
    <value>2181</value>
</property>
</configuration>

在我的主服务器和区域服务器中。我的 /etc/hosts/ 主文件:

# 127.0.0.1     localhost
# 127.0.1.1     hbase-master

192.168.100.150 hbase-master
192.168.100.151 hbase-regionserver1
192.168.100.152 hadoop-namenode

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

在我的区域服务器中:

# 127.0.0.1     localhost
# 127.0.1.1     hbase-regionserver1

192.168.100.150 hbase-master
192.168.100.151 hbase-regionserver1
192.168.100.152 hadoop-namenode

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

我正在使用 Hbase 1.2.2 和 Hadoop 2.6.2。我究竟做错了什么?谢谢!

更新

以一种非常扭曲的方式,添加

192.168.100.150 localhost

到我的主人的 /etc/hosts 和我的区域服务器的 /etc/hosts/ 并从 hbase-site.xml 上删除两个带有 ZooKeeper 的属性(仲裁和端口)解决了这个问题。这很奇怪,因为我在主服务器和区域服务器上都将我主服务器的 IP 硬连接到 localhost

显然以下几行也破坏了 HBase 配置:

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

所以将它们注释掉,一切正常:

# The following lines are desirable for IPv6 capable hosts
# ::1     localhost ip6-localhost ip6-loopback
# ff02::1 ip6-allnodes
# ff02::2 ip6-allrouters