我有一个小的HBase / Hadoop集群。我可以登录主服务器并通过hbase shell运行针对hbase的命令,没有任何问题。但是,当我尝试从远程计算机执行相同的操作时,我收到以下错误:
错误:等待通道准备连接时超时20000毫秒。 h:java.nio.channels.SocketChannel [connection-pending remote = / 10.175.224.75:6000]
我在主服务器上运行netstat以确认它正在侦听端口60000并获得以下内容(x.x.x.x是主服务器的IP地址)。
tcp 0 0 x.x.x.x:60000 : LISTEN
我认为这意味着主服务器仅侦听源自自身的端口60000上的连接。有没有办法配置HBase接受远程连接?这是我的hbase-site.xml。
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hbase.master</name>
<value>master:60000</value>
<description>The host and port that the HBase master runs at.
TODO: Support 'local' (All running in single context).
</description>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://master:9000/hbase</value>
<description>The directory shared by RegionServers.
</description>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
<description>The mode the cluster will be in. Possible values are
false: standalone and pseudo-distributed setups with managed Zookeeper
true: fully-distributed with unmanaged Zookeeper Quorum (see hbase-env.sh)
</description>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
<property>
<name>zookeeper.znode.parent</name>
<value>/master</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/hduser/hbase/zookeeper</value>
</property>
</configuration>