问题

上传完hbase,配置好 hbase-site.xml ,启动hbase,查看日志出现问题。

2019-12-06 18:03:31,894 ERROR [master/hadoop-master:16000:becomeActiveMaster] master.HMaster: Failed to become active master
        at org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore.rollWriter(WALProcedureStore.java:1092)
        at org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore.recoverLease(WALProcedureStore.java:424)
        at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.init(ProcedureExecutor.java:576)
        at org.apache.hadoop.hbase.master.HMaster.createProcedureExecutor(HMaster.java:1528)
        at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:938)
        at org.apache.hadoop.hbase.master.HMaster.startActiveMasterManager(HMaster.java:2112)
        at org.apache.hadoop.hbase.master.HMaster.lambda$run$0(HMaster.java:580)
        at java.lang.Thread.run(Thread.java:745)
2019-12-06 18:03:31,895 ERROR [master/hadoop-master:16000:becomeActiveMaster] master.HMaster: ***** ABORTING master hadoop-master,16000,1575626600996: Unhandled exception. Starting shutdown. *****
java.lang.IllegalStateException: The procedure WAL relies on the ability to hsync for proper operation during component failures, but the underlying filesystem does not support doing so. Please check the config value of 'hbase.procedure.store.wal.use.hsync' to set the desired level of robustness and ensure the config value of 'hbase.wal.dir' points to a FileSystem mount that can provide it.
        at org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore.rollWriter(WALProcedureStore.java:1092)
        at org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore.recoverLease(WALProcedureStore.java:424)
        at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.init(ProcedureExecutor.java:576)
        at org.apache.hadoop.hbase.master.HMaster.createProcedureExecutor(HMaster.java:1528)
        at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:938)
        at org.apache.hadoop.hbase.master.HMaster.startActiveMasterManager(HMaster.java:2112)
        at org.apache.hadoop.hbase.master.HMaster.lambda$run$0(HMaster.java:580)
        at java.lang.Thread.run(Thread.java:745)
2019-12-06 18:03:31,895 INFO  [master/hadoop-master:16000:becomeActiveMaster] regionserver.HRegionServer: ***** STOPPING region server 'hadoop-master,16000,1575626600996' *****
2019-12-06 18:03:31,895 INFO  [master/hadoop-master:16000:becomeActiveMaster] regionserver.HRegionServer: STOPPED: Stopped by master/hadoop-master:16000:becomeActiveMaster
2019-12-06 18:03:32,590 INFO  [master/hadoop-master:16000.splitLogManager..Chore.1] hbase.ScheduledChore: Chore: SplitLogManager Timeout Monitor was stopped
2019-12-06 18:03:34,214 INFO  [master/hadoop-master:16000] ipc.NettyRpcServer: Stopping server on /10.0.1.73:16000
2019-12-06 18:03:34,222 INFO  [master/hadoop-master:16000] regionserver.HRegionServer: Stopping infoServer
2019-12-06 18:03:34,229 INFO  [master/hadoop-master:16000] handler.ContextHandler: Stopped o.e.j.w.WebAppContext@558756be{/,null,UNAVAILABLE}{file:/usr/local/hadoop-2.10.0/hbase-2.2.2/hbase-webapps/master}
2019-12-06 18:03:34,233 INFO  [master/hadoop-master:16000] server.AbstractConnector: Stopped ServerConnector@2931ab92{HTTP/1.1,[http/1.1]}{0.0.0.0:16010}
2019-12-06 18:03:34,233 INFO  [master/hadoop-master:16000] handler.ContextHandler: Stopped o.e.j.s.ServletContextHandler@1bc776b7{/static,file:///usr/local/hadoop-2.10.0/hbase-2.2.2/hbase-webapps/static/,UNAVAILABLE}
2019-12-06 18:03:34,233 INFO  [master/hadoop-master:16000] handler.ContextHandler: Stopped o.e.j.s.ServletContextHandler@3b1ed14b{/logs,file:///usr/local/hadoop-2.10.0/hbase-2.2.2/logs/,UNAVAILABLE}
2019-12-06 18:03:34,236 INFO  [master/hadoop-master:16000] regionserver.HRegionServer: aborting server hadoop-master,16000,1575626600996
2019-12-06 18:03:34,237 INFO  [master/hadoop-master:16000] regionserver.HRegionServer: stopping server hadoop-master,16000,1575626600996; all regions closed.
2019-12-06 18:03:34,237 INFO  [master/hadoop-master:16000] hbase.ChoreService: Chore service for: master/hadoop-master:16000 had [] on shutdown
2019-12-06 18:03:34,241 INFO  [ReadOnlyZKClient-hadoop-master:2181,hadoop-slave:2181,hadoop-slave02:2181,hadoop-slave03:2181@0x6940cfa3] zookeeper.ZooKeeper: Session: 0x6edaaa11640001 closed
2019-12-06 18:03:34,242 INFO  [ReadOnlyZKClient-hadoop-master:2181,hadoop-slave:2181,hadoop-slave02:2181,hadoop-slave03:2181@0x6940cfa3-EventThread] zookeeper.ClientCnxn: EventThread shut down for session: 0x6edaaa11640001
2019-12-06 18:03:34,244 WARN  [master/hadoop-master:16000] master.ActiveMasterManager: Failed get of master address: java.io.IOException: Can't get master address from ZooKeeper; znode data == null
2019-12-06 18:03:34,245 INFO  [master/hadoop-master:16000] wal.WALProcedureStore: Stopping the WAL Procedure Store, isAbort=true
2019-12-06 18:03:34,245 INFO  [master/hadoop-master:16000] hbase.ChoreService: Chore service for: master/hadoop-master:16000.splitLogManager. had [] on shutdown
2019-12-06 18:03:34,257 INFO  [main-EventThread] zookeeper.ClientCnxn: EventThread shut down for session: 0x36efe64ffc20001
2019-12-06 18:03:34,258 INFO  [master/hadoop-master:16000] zookeeper.ZooKeeper: Session: 0x36efe64ffc20001 closed
2019-12-06 18:03:34,258 INFO  [master/hadoop-master:16000] regionserver.HRegionServer: Exiting; stopping=hadoop-master,16000,1575626600996; zookeeper connection closed.
2019-12-06 18:03:34,258 ERROR [main] master.HMasterCommandLine: Master exiting
java.lang.RuntimeException: HMaster Aborted
        at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:244)
        at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:140)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
        at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:149)
        at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2942)

解决

在配置文件 hbase-site.xml 中添加:

<property>
  <name>hbase.unsafe.stream.capability.enforce</name>
  <value>false</value>
</property>

重启之后,问题就解决了。

 

 

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐