无法连接到远程Hbase [英] Not able to connect to remote Hbase

查看:196
本文介绍了无法连接到远程Hbase的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在分布模式下安装了Hbase。数据库工作正常,我可以连接到数据库,如果我的webapp(spring + datanucleus JDO)部署在Hbase主机所在的机器上。



但是如果我在另一台机器上运行相同的webapp,我无法连接到HBase服务器。根本没有例外,webapp只是暂停,几分钟后才会停止。我的配置文件如下:

hbase-site.xml - >

 <结构> 
<属性>
<名称> hbase.zookeeper.quorum< / name>
<值>< IP>:2181< /值>
< description> HBase主机运行的主机和端口。
< / description>
< / property>
< / configuration>

datanucleus.properties - >

  javax.jdo.PersistenceManagerFactoryClass = org.datanucleus.api.jdo.JDOPersistenceManagerFactory 
javax.jdo.option.ConnectionURL = hbase:
datanucleus.autoCreateSchema = true
datanucleus.autoCreateTables = true
datanucleus.autoCreateColumns = true
datanucleus.cache.level2.type = none

我在这里做错了什么。而且所有端口都应该可以访问客户机器(因为在生产中我们只打开需要的端口)。

谢谢

  {property} 
{name } hbase.zookeeper.quorum {/ name}
{value} www.remoterg12.net {/ value} {! - 这是外部可访问的域 - }
{/ property}
{property}
{name} hbase.zookeeper.property.clientPort {/ name}
{value} 2181 {/ value} {! - 所有内容都需要从外部访问 - }
{/ property}
{property}
{name} hbase.master.info.port {/ name} {! - http://www.remoterg12.net:60010/ - }
{value} 60010 {/ value}
{/ property}
{property}
{name} hbase.master.info.b indAddress {/ name}
{value} www.remoterg12.net {/ value} {! - 使用它来访问GUI控制台, -
{/ property}

远程GUI将为您提供绑定域的清晰图片。例如,HBase Master GUI Web控制台应该是这样的:www.remoterg12.net:60010(它不应该是本地主机:60010)...并且是的,我必须在/ etc /不想搞乱现有的Apache配置: - )


i have a Hbase installation in distributed mode. The database is working fine and I am able to connect to the database if my webapp(spring + datanucleus JDO) is deployed on the same machine as the Hbase master.

But if I run the same webapp on a different machine I am not able to connect to the HBase server. There are no exceptions at all and the webapp just stalls and after a few minutes times out. My config files are as follows:

hbase-site.xml ->

<configuration>
  <property>
    <name>hbase.zookeeper.quorum</name>
    <value><IP>:2181</value>
    <description>The host and port that the HBase master runs at.
    </description>
  </property>
</configuration>

datanucleus.properties ->

javax.jdo.PersistenceManagerFactoryClass=org.datanucleus.api.jdo.JDOPersistenceManagerFactory
javax.jdo.option.ConnectionURL=hbase:
datanucleus.autoCreateSchema=true
datanucleus.autoCreateTables=true
datanucleus.autoCreateColumns=true
datanucleus.cache.level2.type=none

What am I doing wrong here. And also what all ports should be accessible to the client machines (as in production we open only required ports).

Thanks

解决方案

The HBase is very sensitive to /etc/hosts configurations.. I had to set the zeekeeper bindings property in the hbase-site.xml correctly in order for the above mentioned Java code to work...For example: I had to set it as follows:

{property}
  {name}hbase.zookeeper.quorum{/name}
  {value}www.remoterg12.net{/value}      {!-- this is the externally accessible domain --}
{/property}
{property}
  {name}hbase.zookeeper.property.clientPort{/name}
  {value}2181{/value}              {!-- everything needs to be externally accessible --}
{/property}
{property}
  {name}hbase.master.info.port{/name}    {!--   http://www.remoterg12.net:60010/ --}
  {value}60010{/value}
{/property}
{property}
  {name}hbase.master.info.bindAddress{/name}
  {value}www.remoterg12.net{/value}      {!-- Use this to access the GUI console, --}
{/property}

The Remote GUI will give you a clear picture of the Binding Domains.. For example, the [HBase Master] property in the "GUI Web console" should be something like this: www.remoterg12.net:60010 (It should NOT be localhost:60010 )... AND YES!!, I did have to play around with the /etc/hosts just right as I didn't want to mess up the existing Apache configs :-)

这篇关于无法连接到远程Hbase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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