3次退休后,Hbase错误动物园管理员存在失败 [英] Hbase error zookeeper exists failed after 3 retiries

查看:185
本文介绍了3次退休后,Hbase错误动物园管理员存在失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu中使用HBASE 0.94.8独立模式。它的工作很好,我可以在Hbase-shell中完成所有操作。但是,当我登录我的系统后给它下面的错误

  15/07/28 15:10:30错误zookeeper.RecoverableZooKeeper: ZooKeeper在3次重试后失败
15/07/28 15:10:30 WARN zookeeper.ZKUtil:hconnection-0x14ed40513350009无法在znode(/ hbase)上设置观察器
org.apache.zookeeper.KeeperException $ /Hbase
org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
在org.apache.zookeeper.KeeperException.create(KeeperException.java:51)中的连接丢失:KeeperErrorCode =
at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1041)
at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:172)
在org.apache.hadoop.hbase.zookeeper.ZKUtil.checkExists(ZKUtil.java:450)
at org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.checkIfBaseNodeAvailable(ZooKeeperNodeTracker.java:208)
在org.apache.hadoop.hbase.zookeeper.R ootRegionTracker.waitRootRegionLocation(RootRegionTracker.java:77)
位于org.apache.hadoop.hbase.client.HConnectionManager $ HConnectionImplementation.locateRegion(HConnectionManager.java:885)
位于org.apache.hadoop.hbase。客户端连接管理器$ HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:998)
在org.apache.hadoop.hbase.client.HConnectionManager $ HConnectionImplementation.locateRegion(HConnectionManager.java:896)
在org.apache。 hadoop.hbase.client.HConnectionManager $ HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:998)
at org.apache.hadoop.hbase.client.HConnectionManager $ HConnectionImplementation.locateRegion(HConnectionManager.java:900)
at org.apache.hadoop.hbase.client.HConnectionManager $ HConnectionImplementation.locateRegion(HConnectionManager.java:857)

是的,我确定我搜索了很多。我发现一些信息 ZooKeeper在3次重试后失败。可能是此错误是因为 zookeeper 已停止。但我不知道要重新启动它。我试着再次启动 Hbase thrift ,但仍然是问题。



这个命令 ps axww | grep QuorumPeerMain 给出了以下输出:

  6162 pts / 2 S + 0:00 grep --color = auto QuorumPeerMain 

如果我重新启动系统,Hbase会开始工作。但我想要适当的解决方案。




临时解决方案



用下面的命令我grep这个HBASE的过程:

  ps -fe grep | hbase 

然后杀死HBASE的所有进程:

  kill -9 4555 //假设4555是hbase的进程ID 

然后用sudo和thrift重新启动hbase,它开始工作,但我想要永久解决方案。因为如果我在服务器中使用HBASE(意味着不是本地计算机),我无法每次都重新启动HBASE。 解决方案

问题

3次退休后,Hbase错误zookeeper存在失败
清楚地表明动物园管理员法定人数未运行 - 大多数可能的原因可能与您在 conf / hbase-site.xml 中的zookeeper.quorum设置不一致,最小值必须为:


 < configuration> 
<属性>
<名称> hbase.rootdir< /名称>
< value> file:/// home / testuser / hbase< / value>
< / property>
<属性>
<名称> hbase.zookeeper.property.dataDir< / name>
<值> / home / testuser / zookeeper< /值>
< / property>
< / configuration>

在下一节中,简要地提到为什么需要zookeeper,以及如何验证它是否正在运行。






概述

从文本中预先设定(独立设置) - 您正在混合的东西。
Zookeeper用简单的语言来管理HBase,并且是必须的要求。


默认情况下,HBase自己处理zookeeper设置,启动 - 停止(尽管可以更改) - 验证文件的查看 conf / hbase-evn .h (在你的hbase目录中)必须有一行:

  export HBASE_MANAGES_ZK = true 

基本上告诉HBase它是否应该管理它自己的Zookeeper实例。如果它设置为 false ,编辑为 true



现在为了验证,有一个有用的命令(忘记 ps 然后 grep ):

  $ jps 

命令会列出机器上的所有Java进程(HBase本身就是一个Java应用程序),即可能的输出必须是(对于最小化的独立HBase设置):

  62019 Jps 
61098 HMaster
61233 HRegionServer
61003 HQuorumPeer

不要仅仅杀死HBase进程,而是使用start-stop实用程序:

  $ ./bin/stop-hbase.sh 

进行必要的更改并重新开始:

  $ ./bin/start-hbase.sh 

PS 我可能误解了您的问题(完全),请在我回复的评论中告诉我再次给你并获得正确的解决方案 - 即将到来的SO访问者。


I am using HBASE 0.94.8 standalone mode in Ubuntu. Its working fine i am able to do every operations in Hbase-shell. But after i logged of my system its giving following error

15/07/28 15:10:30 ERROR zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 3 retries
15/07/28 15:10:30 WARN zookeeper.ZKUtil: hconnection-0x14ed40513350009 Unable to set watcher on znode (/hbase)
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.exists(ZooKeeper.java:1041)
    at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:172)
    at org.apache.hadoop.hbase.zookeeper.ZKUtil.checkExists(ZKUtil.java:450)
    at org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.checkIfBaseNodeAvailable(ZooKeeperNodeTracker.java:208)
    at org.apache.hadoop.hbase.zookeeper.RootRegionTracker.waitRootRegionLocation(RootRegionTracker.java:77)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:885)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:998)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:896)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:998)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:900)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:857)

Yes sure i have searched a lot. I have found some information ZooKeeper exists failed after 3 retries. May be this error is because zookeeper is stopped. But i don't know to to restart it again. I tried to start Hbase and thrift again but still this is issue.

This command ps axww | grep QuorumPeerMain gives me following output:

 6162 pts/2    S+     0:00 grep --color=auto QuorumPeerMain

Hbase starts working if i restart my system. But i want proper solution.


Temporary solution

with following command i grep this process of HBASE:

ps -fe grep | hbase

and then kill all process of HBASE :

kill -9 4555//assuming 4555 is process id of hbase

Then restarted hbase with sudo and thrift and it start working but i want permanent solution. Because if i am using HBASE in server (means not local machine) i can't restart HBASE everytime.

解决方案

Issue:

Hbase error zookeeper exists failed after 3 retiries clearly indicates that zookeeper quorum is not running - most probable cause can be some inconsistency with your zookeeper.quorum setting in conf/hbase-site.xml, the minimal has to be:

<configuration>
  <property>
    <name>hbase.rootdir</name>
    <value>file:///home/testuser/hbase</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/home/testuser/zookeeper</value>
  </property>
</configuration>

In the next section it is succinctly mentioned why zookeeper is required and how can one verify if it's running.


An overview:

Pre-assuming from your text (standalone setup) - you're mixing things up. Zookeeper in simple words manages HBase, and is a must requirement.

By default HBase itself handles zookeeper setup, start-stop (though one can change) - to verify look into the file conf/hbase-evn.sh (in your hbase directory) there must be a line:

export HBASE_MANAGES_ZK=true

Basically tells HBase whether it should manage its own instance of Zookeeper or not. In case it is set to false, edit to true.

Now for verification there's a helpful command (forget about the ps and then grep):

$ jps

the command will list all the java processes (HBase is itself a Java application) on the machine i.e. the probable output has to be (for a minimal standalone HBase setup):

62019 Jps
61098 HMaster        
61233 HRegionServer     
61003 HQuorumPeer

Don't just kill the HBase process, instead use the start-stop utility:

$ ./bin/stop-hbase.sh

make the neccessary changes and start it again:

$ ./bin/start-hbase.sh

P.S. I could have misinterpreted your question (completely), do let me know in the comments I'll get back to you again and get the solution right - for the upcoming SO visitors.

这篇关于3次退休后,Hbase错误动物园管理员存在失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆