开启 hbase 时,slave 上的 HRegionServer 没有启动

这里写图片描述

  • 问题描述
  • 解决方法
  • ps

1.问题描述

我在开启 hbase 时发现 slave 上的 HRegionserver 没有启动,后来查看 log 日志发现如下问题:
开启 hbase 时,slave 上的 HRegionServer 没有启动_第1张图片

开启 hbase 时,slave 上的 HRegionServer 没有启动_第2张图片

开启 hbase 时,slave 上的 HRegionServer 没有启动_第3张图片

开启 hbase 时,slave 上的 HRegionServer 没有启动_第4张图片

由上述图片中的信息初步判断是由于 date 时间设置没有与主机同步

2.解决方法

第一种:使用 date -s “2014-1-4 12:16:00” 在 root 权限下键入时间,使其与 主机同步
第二种:http://blog.csdn.net/u011414200/article/details/50408272

3.ps

starting master, logging to /usr/hadoop/hbase/logs/hbase-hadoop-master-Master.Hadoop.out
192.168.1.4: starting regionserver, logging to /usr/hadoop/hbase/logs/hbase-hadoop-regionserver-Slave2.Hadoop.out
192.168.1.5: regionserver running as process 7155. Stop it first.
192.168.1.3: starting regionserver, logging to /usr/hadoop/hbase/logs/hbase-hadoop-regionserver-Slave1.Hadoop.out
192.168.1.4: Exception in thread "main" java.lang.RuntimeException: Failed construction of Regionserver: class org.apache.hadoop.hbase.regionserver.HRegionServer
192.168.1.4:    at org.apache.hadoop.hbase.regionserver.HRegionServer.constructRegionServer(HRegionServer.java:3977)
192.168.1.4:    at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.start(HRegionServerCommandLine.java:60)
192.168.1.4:    at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.run(HRegionServerCommandLine.java:75)
192.168.1.4:    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
192.168.1.4:    at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76)
192.168.1.4:    at org.apache.hadoop.hbase.regionserver.HRegionServer.main(HRegionServer.java:4001)
192.168.1.4: Caused by: java.lang.reflect.InvocationTargetException
192.168.1.4:    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
192.168.1.4:    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
192.168.1.3: Exception in thread "main" java.lang.RuntimeException: Failed construction of Regionserver: class org.apache.hadoop.hbase.regionserver.HRegionServer
192.168.1.3:    at org.apache.hadoop.hbase.regionserver.HRegionServer.constructRegionServer(HRegionServer.java:3977)
192.168.1.3:    at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.start(HRegionServerCommandLine.java:60)
192.168.1.3:    at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.run(HRegionServerCommandLine.java:75)
192.168.1.3:    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
192.168.1.3:    at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76)
192.168.1.3:    at org.apache.hadoop.hbase.regionserver.HRegionServer.main(HRegionServer.java:4001)
192.168.1.3: Caused by: java.lang.reflect.InvocationTargetException
192.168.1.3:    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
192.168.1.3:    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
[hadoop@Master bin]$ netstat -apn | grep 60020
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)

日志报错如下

DEBUG org.apache.hadoop.hbase.master.HMaster: Set serverside HConnection retries=100
2013-05-14 17:36:17,689 ERROR org.apache.hadoop.hbase.master.HMasterCommandLine: Failed to start master
java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster
        at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:2030)
        at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:152)
        at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:104)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76)
        at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2044)
Caused by: java.net.BindException: Address already in use
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Net.java:344)
        at sun.nio.ch.Net.bind(Net.java:336)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:199)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
        at org.apache.hadoop.hbase.ipc.HBaseServer.bind(HBaseServer.java:256)
        at org.apache.hadoop.hbase.ipc.HBaseServer$Listener.(HBaseServer.java:482)
        at org.apache.hadoop.hbase.ipc.HBaseServer.(HBaseServer.java:1559)
        at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Server.(WritableRpcEngine.java:252)
        at org.apache.hadoop.hbase.ipc.WritableRpcEngine.getServer(WritableRpcEngine.java:201)
        at org.apache.hadoop.hbase.ipc.WritableRpcEngine.getServer(WritableRpcEngine.java:55)
        at org.apache.hadoop.hbase.ipc.HBaseRPC.getServer(HBaseRPC.java:330)
        at org.apache.hadoop.hbase.ipc.HBaseRPC.getServer(HBaseRPC.java:319)
        at org.apache.hadoop.hbase.master.HMaster.(HMaster.java:302)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:2025)

解决方法是:

[hadoop@Master logs]$ netstat -apn | grep 60000
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 ::ffff:192.168.1.2:60000    :::*                        LISTEN      17681/java          
[hadoop@Master logs]$ kill 17681

你可能感兴趣的:(HADOOP,hbase)