qq513536189
FlyGently
2016-12-26 01:49

hbase启动几十秒后,HMaster和HRegionserver自动关闭

  • hbase

采用hbase自带的zookeeper。
hbase-site.xml配置如下:


hbase.rootdir
hdfs://master:9000/hbase
hadoop集群地址



hbase.cluster.distributed
true
是否启动集群模式


hbase.tmp.dir
/root/hbase-1.2.4/tmp


hbase.master #指定hbase集群主控节点
master:60000


hbase.zookeeper.quorum
slave1,slave2,slave3
zookeeper集群主机名列表


hbase-root-master-master.log部分日志如下:
2016-12-26 09:23:53,703 INFO [main-SendThread(slave2:2181)] zookeeper.ClientCnxn: Socket connection established to slave2/192.168.241.237:2181, initiating session
2016-12-26 09:23:53,707 INFO [main-SendThread(slave2:2181)] zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2016-12-26 09:23:54,117 INFO [main-SendThread(slave3:2181)] zookeeper.ClientCnxn: Opening socket connection to server slave3/192.168.241.238:2181. Will not attempt to authenticate using SASL (unknown error)
2016-12-26 09:23:54,123 INFO [main-SendThread(slave3:2181)] zookeeper.ClientCnxn: Socket connection established to slave3/192.168.241.238:2181, initiating session
2016-12-26 09:23:54,125 INFO [main-SendThread(slave3:2181)] zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2016-12-26 09:23:56,025 INFO [main-SendThread(slave1:2181)] zookeeper.ClientCnxn: Opening socket connection to server slave1/192.168.241.236:2181. Will not attempt to authenticate using SASL (unknown error)
2016-12-26 09:23:56,027 INFO [main-SendThread(slave1:2181)] zookeeper.ClientCnxn: Socket connection established to slave1/192.168.241.236:2181, initiating session
2016-12-26 09:23:56,030 INFO [main-SendThread(slave1:2181)] zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2016-12-26 09:23:56,133 ERROR [main] zookeeper.RecoverableZooKeeper: ZooKeeper create failed after 4 attempts
2016-12-26 09:23:56,134 ERROR [main] master.HMasterCommandLine: Master exiting
java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster.
at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:2426)
at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:231)
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:137)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:126)
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2436)
Caused by: org.apache.hadoop.hbase.ZooKeeperConnectionException: master:160000x0, quorum=slave1:2181,slave2:2181,slave3:2181, baseZNode=/hbase Unexpected KeeperException creating base node
at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.createBaseZNodes(ZooKeeperWatcher.java:206)
at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.(ZooKeeperWatcher.java:187)
at org.apache.hadoop.hbase.regionserver.HRegionServer.(HRegionServer.java:585)
at org.apache.hadoop.hbase.master.HMaster.(HMaster.java:381)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:2419)
... 5 more
Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase
at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:783)
at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.createNonSequential(RecoverableZooKeeper.java:565)
at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.create(RecoverableZooKeeper.java:544)
at org.apache.hadoop.hbase.zookeeper.ZKUtil.createWithParents(ZKUtil.java:1204)
at org.apache.hadoop.hbase.zookeeper.ZKUtil.createWithParents(ZKUtil.java:1182)
at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.createBaseZNodes(ZooKeeperWatcher.java:194)
... 13 more

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答