简体   繁体   English

HBase NoServerForRegionException?

[英]HBase NoServerForRegionException?

I am getting this exception when for a while i didn't communicated with HBase: 我有一段时间没有与HBase通信时遇到此异常:

org.apache.hadoop.hbase.client.NoServerForRegionException: Timed out trying to locate root region because: Connection refused org.apache.hadoop.hbase.client.NoServerForRegionException:尝试定位根区域超时,原因是:连接被拒绝

is this something related with session expiry, if so, how can i extend session lifetime? 这与会话到期有关吗?如果是,我如何延长会话寿命?

Query bin/hbase hbck and find in which machine root Regionserver is running.. 查询bin/hbase hbck并找到运行根机器的Regionserver。

You should get -ROOT- is okay on hbck. 您应该在-ROOT- is okay上获得-ROOT- is okay问题。 Make sure that all your Regionserver is up and running. 确保您所有的Regionserver都已启动并正在运行。

use start regionserver for starting regionserver 使用start regionserver启动区域服务器

This error shows that the client is not able to talk to Region server. 此错误表明客户端无法与区域服务器通信。 Check the region server associated with the region its trying to connect and check its up. 检查与其尝试连接的区域关联的区域服务器并检查其启动状态。

To identify the region server associated with the region please go through http://hbase.apache.org/0.94/book/regions.arch.html#regions.arch.assignment 要标识与该区域关联的区域服务器,请访问http://hbase.apache.org/0.94/book/regions.arch.html#regions.arch.assignment

Some factors have played a role here. 一些因素在这里起作用。

Please note the below steps which occur when you try to connect to Hbase from a client, 请注意当您尝试从客户端连接到Hbase时发生的以下步骤,

  1. Hbase connects to Zookeeper to get the Ip of the regionservers which host the ROOT table. Hbase连接到Zookeeper,以获取托管ROOT表的区域服务器的IP。
  2. The client caches this information about the IP's so that it doesnt have to contact the zookeeper again. 客户端会缓存有关IP的信息,这样就不必再次联系Zookeeper。

Your problem is that, your client is trying to connect to the zookeeper to get the IP. 您的问题是,您的客户端正在尝试连接到Zookeeper以获得IP。 one of the below things may be going wrong, 以下情况之一可能出了问题,

  1. Your client is not able to connect to the zookeeper. 您的客户端无法连接到Zookeeper。
  2. The information about the ROOT contained inside the Znode in ZooKeeper is wrong. ZooKeeper的Znode内包含的有关ROOT的信息是错误的。

Possible fixes. 可能的修复。

  1. Check if your zookeeper is working fine. 检查您的动物园管理员是否工作正常。

  2. Delete the Znode for Hbase in your Zookeeper and restart the cluster. 在Zookeeper中删除用于Hbase的Znode,然后重新启动集群。 Don't worry, this wont delete your data. 不用担心,这不会删除您的数据。

Once this is achieved? 一旦实现了? the client can get the ROOT information and then query for the META table without any issue. 客户端可以获取ROOT信息,然后查询META表而没有任何问题。

I don't think this has anything to do with session lifetime. 我认为这与会话生存期无关。

Check your cluster to make sure that it is up and working correctly and all region servers are alive. 检查您的群集,以确保其正常运行并且所有区域服务器都处于活动状态。 Then check the logs to make sure that they are not reporting some error state. 然后检查日志以确保它们未报告某些错误状态。

HBase is complex software -- without more detailed information it is very difficult to diagnose what is going on. HBase是复杂的软件-没有更详细的信息,很难诊断正在发生的事情。 And often you can discover the problem by collecting the more detailed information. 通常,您可以通过收集更详细的信息来发现问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM