Hbase regionserver获得关闭

时间:2015-02-23 10:17:29

标签: java hadoop hbase apache-zookeeper

我们已经安装了一台带有3台机器的小型Hadoop集群。我们正在使用Hortonworks。

我们使用以下代码从Java客户端连接到Hbase。

Configuration config = HBaseConfiguration.create()
config.set(“hbase.zookeeper.quorum”, “xxxxxx”);
config.set(“hbase.zookeeper.property.clientPort”, “2181”);
config.set(“hbase.client.operation.timeout”, “1000”);
HConnection connection =HConnectionManager.createConnection(config);
HTableInterface hTable = connection.getTable(tableName);

但不知怎的,Hbase区域服务器会在一段时间后自动关闭并发出以下错误。

2015-02-23 03:38:49,472 WARN [regionserver60020] zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper, quorum=ip-10-174-18-85.ap-southeast-1.compute.internal:2181,ip-10-149-130-178.ap-southeast-1.compute.internal:2181,ip-10-174-28-180.ap-southeast-1.compute.internal:2181, exception=org.apache.zookeeper.KeeperException$SessionExpiredException: KeeperErrorCode = Session expired for /hbase/rs/ip-10-174-28-180.ap-southeast-1.compute.internal,60020,1424680062858
2015-02-23 03:38:49,472 ERROR [regionserver60020] zookeeper.RecoverableZooKeeper: ZooKeeper delete failed after 4 attempts
2015-02-23 03:38:49,472 WARN [regionserver60020] regionserver.HRegionServer: Failed deleting my ephemeral node
org.apache.zookeeper.KeeperException$SessionExpiredException: KeeperErrorCode = Session expired for /hbase/rs/ip-10-174-28-180.ap-southeast-1.compute.internal,60020,1424680062858
at org.apache.zookeeper.KeeperException.create(KeeperException.java:127)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
at org.apache.zookeeper.ZooKeeper.delete(ZooKeeper.java:873)
at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.delete(RecoverableZooKeeper.java:156)
at org.apache.hadoop.hbase.zookeeper.ZKUtil.deleteNode(ZKUtil.java:1270)
at org.apache.hadoop.hbase.zookeeper.ZKUtil.deleteNode(ZKUtil.java:1259)
at org.apache.hadoop.hbase.regionserver.HRegionServer.deleteMyEphemeralNode(HRegionServer.java:1286)
at org.apache.hadoop.hbase.regionserver.HRegionServer.run(HRegionServer.java:1016)
at java.lang.Thread.run(Thread.java:744)
2015-02-23 03:39:10,233 INFO [regionserver60020] regionserver.HRegionServer: stopping server ip-10-174-28-180.ap-southeast-1.compute.internal,60020,1424680062858; zookeeper connection closed.
2015-02-23 03:39:10,233 INFO [regionserver60020] regionserver.HRegionServer: regionserver60020 exiting
2015-02-23 03:39:10,236 ERROR [main] regionserver.HRegionServerCommandLine: Region server exiting
java.lang.RuntimeException: HRegionServer Aborted
at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.start(HRegionServerCommandLine.java:66)
at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.run(HRegionServerCommandLine.java:85)
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.regionserver.HRegionServer.main(HRegionServer.java:2403)
2015-02-23 03:39:10,240 INFO [Thread-11] regionserver.ShutdownHook: Shutdown hook starting; hbase.shutdown.hook=true; fsShutdownHook=org.apache.hadoop.fs.FileSystem$Cache$ClientFinalizer@abde0e7

我尝试将regionserver的JVM堆大小增加到2GB,会话时间增加到60s。但似乎没有任何帮助。

请帮助解决问题?

2 个答案:

答案 0 :(得分:0)

我清除了一次动物园管理员数据,现在工作正常。我认为动物园管理员内部的一些数据并不一致。

答案 1 :(得分:0)

异常显示“删除我的Ephermal代码失败”

解决方案: 这三台机器有不同的时间。 例如:machine1时间略有不同,其他机器超出异常

如果这三台机器在同一日期和时间内,则会解决此错误。

http://mail-archives.apache.org/mod_mbox/hbase-user/201305.mbox/%3CCAKxWWm1keFKNPmypLSq39RnTf8h=S5SFGyEY+4NB8D7ZOuqbxg@mail.gmail.com%3E