【问题标题】:Fully Distributed HBase Error完全分布式 HBase 错误
【发布时间】:2013-11-08 20:33:57
【问题描述】:

我正在尝试将 HBase 0.96 设置为在我的 Hadoop 2.2.0 集群上运行。我运行 start-hbase.sh 和 master 以及区域启动。我可以登录到每个区域并查看正在运行的进程。但是,当通过 web ui 或 shell 命令检查有多少区域启动时,我得到的响应为 0。根据日志,看起来区域服务器正在启动,但无法通知主服务器它们正在运行。我确认主机正在侦听端口 60000,并且端口 60000 和 60020 都处于打开状态。我已经包含了我的 hbase-site 文件以及来自区域服务器的日志。

<property>
    <name>hbase.rootdir</name>
    <value>hdfs://master:9000/hbase</value>
    <description>The directory shared by RegionServers.
    </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.zookeeper.quorum</name>
   <value>master</value>
 </property>
  <property>
    <name>zookeeper.znode.parent</name>
    <value>/master</value>
  </property>

日志文件:

2013-11-08 20:08:58,357 INFO  [regionserver60020] regionserver.HRegionServer: reportForDuty to master=10.119.102.58,60000,1383941300240 with port=60020, startcode=1383941300420
2013-11-08 20:09:18,636 WARN  [regionserver60020] regionserver.HRegionServer: error telling master we are up
com.google.protobuf.ServiceException: org.apache.hadoop.net.ConnectTimeoutException: 20000 millis timeout while waiting for channel to be ready for connect. ch : java.nio.channels.SocketChannel[connec$
        at org.apache.hadoop.hbase.ipc.RpcClient.callBlockingMethod(RpcClient.java:1667)
        at org.apache.hadoop.hbase.ipc.RpcClient$BlockingRpcChannelImplementation.callBlockingMethod(RpcClient.java:1708)
        at org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos$RegionServerStatusService$BlockingStub.regionServerStartup(RegionServerStatusProtos.java:5402)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.reportForDuty(HRegionServer.java:1924)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.run(HRegionServer.java:790)
        at java.lang.Thread.run(Thread.java:724)
Caused by: org.apache.hadoop.net.ConnectTimeoutException: 20000 millis timeout while waiting for channel to be ready for connect. ch : java.nio.channels.SocketChannel[connection-pending local=/100.65.$
        at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:532)
        at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:493)
        at org.apache.hadoop.hbase.ipc.RpcClient$Connection.setupConnection(RpcClient.java:573)
        at org.apache.hadoop.hbase.ipc.RpcClient$Connection.setupIOstreams(RpcClient.java:858)
        at org.apache.hadoop.hbase.ipc.RpcClient.getConnection(RpcClient.java:1532)
        at org.apache.hadoop.hbase.ipc.RpcClient.call(RpcClient.java:1421)
        at org.apache.hadoop.hbase.ipc.RpcClient.callBlockingMethod(RpcClient.java:1650)
        ... 5 more
2013-11-08 20:09:18,676 WARN  [regionserver60020] regionserver.HRegionServer: reportForDuty failed; sleeping and then retrying.

【问题讨论】:

  • 您肯定有连接问题,请检查 rs 和 master 是否实际侦听给定 IP,而不是 localhost。并且该主机通过网络彼此可用。 (尝试类似 telnet master 60000 )
  • 为什么你的 zookeeper quorum 不包括区域服务器?!

标签: hadoop hbase


【解决方案1】:

我认为hbase.zookeeper.quorum 设置不正确,可能会导致连接超时。如果您只是不想测试 0.96,请以独立模式启动它,然后确保 Zookeeper 集群正在运行,然后再更改为分布式模式。

【讨论】:

    【解决方案2】:

    HRegionServer 抱怨它无法连接到 HMaster 以报告状态(up)。 HMaster 进程很可能没有运行,因此您可能想要启动它,或者如果您已经启动它来检查主日志文件。

    【讨论】:

      【解决方案3】:

      使用以下命令检查您的主服务器是否正在侦听端口 60000
      网络统计 -l tcp6 0 0 Vostro-350:60000 : LISTEN

      如果服务器正在侦听 ipv6,则禁用它。

      要禁用,您必须将以下内容附加到文件中:/etc/sysctl.conf

      net.ipv6.conf.all.disable_ipv6 = 1
      net.ipv6.conf.default.disable_ipv6 = 1
      net.ipv6.conf.lo.disable_ipv6 = 1

      重启后,您应该通过以下方式验证 IPV6 是否真的关闭:
      猫 /proc/sys/net/ipv6/conf/all/disable_ipv6

      (0 = IPV6 开启;1 = IPV6 关闭)

      参考链接:Connecting and Persisting to HBase

      【讨论】:

        猜你喜欢
        • 2015-02-12
        • 1970-01-01
        • 2021-06-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多