【转】hbase 无法启动问题 时间设置

hbase启动时,有些regionserver起不来,
看了日志发现,应该是系统时间不同步导致。
于是把所有机器时间以master为标准同步。
之后启动正常。

时间校准的方法。
由于集群无法访问外网,不能internet,又因为懒得弄时间服务器,
机器不多,手工设置了下时间。
date --set "11/19/11 10:00:00"   (月/日/年 时:分:秒)



regionserver的log中错误代码如下:

2011-11-19 08:58:46,453 DEBUG org.apache.hadoop.hbase.regionserver.PriorityCompactionQueue: Create PriorityCompactionQueue
2011-11-19 08:58:46,453 INFO org.apache.hadoop.hbase.regionserver.HRegionServer: Runs every 10000000ms
2011-11-19 08:58:46,469 INFO org.apache.hadoop.hbase.regionserver.HRegionServer: Attempting connect to Master server at baby6:60000
2011-11-19 08:58:46,781 INFO org.apache.hadoop.hbase.regionserver.HRegionServer: Master isn't available yet, retrying
2011-11-19 08:58:49,784 INFO org.apache.hadoop.hbase.regionserver.HRegionServer: Attempting connect to Master server at baby6:60000
2011-11-19 08:58:49,785 INFO org.apache.hadoop.hbase.regionserver.HRegionServer: Connected to master at baby6:60000
2011-11-19 08:58:49,805 INFO org.apache.hadoop.hbase.regionserver.HRegionServer: Telling master at baby6:60000 that we are up
2011-11-19 08:58:49,809 FATAL org.apache.hadoop.hbase.regionserver.HRegionServer: Master rejected startup because clock is out of sync
org.apache.hadoop.hbase.ClockOutOfSyncException: org.apache.hadoop.hbase.ClockOutOfSyncException: Server baby7,60020,1321664325801 has been rejected; Reported time is too far out of sync with master.  Time difference of 72256ms > max allowed of 30000ms
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:95)
        at org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:79)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.reportForDuty(HRegionServer.java:1557)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.tryReportForDuty(HRegionServer.java:1514)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.run(HRegionServer.java:573)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.hbase.ClockOutOfSyncException: Server baby7,60020,1321664325801 has been rejected; Reported time is too far out of sync with master.  Time difference of 72256ms > max allowed of 30000ms
        at org.apache.hadoop.hbase.master.ServerManager.checkClockSkew(ServerManager.java:184)
        at org.apache.hadoop.hbase.master.ServerManager.regionServerStartup(ServerManager.java:132)
        at org.apache.hadoop.hbase.master.HMaster.regionServerStartup(HMaster.java:643)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
        at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)

        at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
        at org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
        at $Proxy5.regionServerStartup(Unknown Source)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.reportForDuty(HRegionServer.java:1553)
        ... 3 more

你可能感兴趣的:(【转】hbase 无法启动问题 时间设置)