在amzon emr上运行hbase时,外部hbase客户端出现zookeeper仲裁问题

mdfafbf1  于 2021-06-09  发布在  Hbase
关注(0)|答案(1)|浏览(407)

我正在amazon emr上运行hbase。

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
  <property><name>fs.hdfs.impl</name><value>emr.hbase.fs.BlockableFileSystem</value></property>
  <property><name>hbase.regionserver.handler.count</name><value>100</value></property>
  <property><name>hbase.zookeeper.quorum</name><value>ip-xx-xxx-aa-aa.us-west-1.compute.internal</value></property>
  <property><name>hbase.rootdir</name><value>hdfs://xx.xxx.aa.aa:9000/hbase</value></property>
  <property><name>hbase.cluster.distributed</name><value>true</value></property>
  <property><name>hbase.tmp.dir</name><value>/mnt/var/lib/hbase/tmp-data</value></property>
  <property><name>hbase.master.wait.for.log.splitting</name><value>true</value></property>
</configuration>

以上是配置。现在,我正在尝试使用以下方法启动新的hbase客户端:

val zk_quoroum = "xx.xxx.aa.aa"
val hBaseClient = new HBaseClient(zk_quoroum)

我无法与Zookeeper取得联系:

6:04:54.238 [main-SendThread()] INFO  org.apache.zookeeper.ClientCnxn - Opening socket connection to server /xx.xxx.aa.aa:2181
16:04:59.264 [main-SendThread(xx.xxx.aa.aa:2181)] INFO  org.apache.zookeeper.ClientCnxn - Client session timed out, have not heard from server in 5026ms for sessionid 0x0, closing socket connection and attempting reconnect

重新连接一直在尝试,但从未获得连接。这与仲裁是一个内部url有关吗?客户不住在aws。以前有人遇到过吗?

wz8daaqr

wz8daaqr1#

所以问题是2181端口不允许从外部IP访问。添加tcp规则修复了此问题。

相关问题