首页 / 浏览问题 / 其他 / 问题详情
创建Hbase数据源失败
61EXP 2022年08月31日

按照文档部署了,Hbase可以访问,但是创建不了数据源,不确定是哪个环节出了问题

1、HBase分布式数据源支持的HBase版本为1.2——1.4之间。

2、需要手动注册Geomesa使用的HBase Coprocessor,通过修改HBase安装目录\conf\目录下的hbase-site.xml文件内容实现,只需在该文件中添加如下内容:

<property>

<name>hbase.coprocessor.user.region.classes</name>

<value>org.locationtech.geomesa.hbase.coprocessor.GeoMesaCoprocessor</value>

</property>

3、“HBase安装目录\lib\”目录下必须具有geomesa-hbase-distributed-runtime_2.11-2.2.0.jar文件,且版本为2.11-2.2.0版本及以上。另外,我们修复了HBase数据中文字段使用的问题,并将修复结果以新的geomesa-hbase-distributed-runtime_2.11-2.2.0-sm_200828.jar文件提供,该修复后的文件位于产品安装目录下的support文件中,因此,如果您在应用HBase数据中使用了中文字段,请将该文件替换到“HBase安装目录\lib\”目录下,并删除已有的geomesa-hbase-distributed-runtime_2.11-2.2.0.jar文件。

1个回答

你好,你可以从以下思路排查问腿:

1.idesktopx所在的电脑与hbase数据库所在电脑的ip是否能ping通,排查网络原因;

2.查看idesktopx目录下的logs文件夹里面是否有报错日志可用的信息帮助分析问题。
3,740EXP 2022年08月31日
网络没有问题,下面是发现的日志[2022-08-31 10:28:57:426 INFO ] Initiating client connection, connectString=10.10.10.100:2181 sessionTimeout=180000 watcher=org.apache.hadoop.hbase.zookeeper.PendingWatcher@4e61314f
[2022-08-31 10:28:57:465 INFO ] Opening socket connection to server 10.10.10.100/10.10.10.100:2181. Will not attempt to authenticate using SASL (unknown error)
[2022-08-31 10:28:57:470 INFO ] Socket connection established to 10.10.10.100/10.10.10.100:2181, initiating session
[2022-08-31 10:28:57:499 INFO ] Session establishment complete on server 10.10.10.100/10.10.10.100:2181, sessionid = 0x100821143330016, negotiated timeout = 40000
[2022-08-31 10:29:51:142 INFO ] Call exception, tries=10, retries=31, started=53255 ms ago, cancelled=false, msg=Call to localhost/127.0.0.1:16020 failed on connection exception: java.net.ConnectException: Connection refused: no further information row 'qjdc,,' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=localhost,16020,1661910780421, seqNum=0
[2022-08-31 10:29:51:152 INFO ] Closing zookeeper sessionid=0x100821143330016
[2022-08-31 10:29:51:190 INFO ] Session: 0x100821143330016 closed
[2022-08-31 10:29:51:190 INFO ] EventThread shut down
[2022-08-31 10:29:51:217 INFO ] Process identifier=hconnection-0x4f8dfbd2 connecting to ZooKeeper ensemble=10.10.10.100:2181
[2022-08-31 10:29:51:217 INFO ] Initiating client connection, connectString=10.10.10.100:2181 sessionTimeout=180000 watcher=org.apache.hadoop.hbase.zookeeper.PendingWatcher@2e6e344e
[2022-08-31 10:29:51:220 INFO ] Opening socket connection to server 10.10.10.100/10.10.10.100:2181. Will not attempt to authenticate using SASL (unknown error)
[2022-08-31 10:29:51:231 INFO ] Socket connection established to 10.10.10.100/10.10.10.100:2181, initiating session
[2022-08-31 10:29:51:250 INFO ] Session establishment complete on server 10.10.10.100/10.10.10.100:2181, sessionid = 0x100821143330017, negotiated timeout = 40000
[2022-08-31 10:30:44:296 INFO ] Call exception, tries=10, retries=31, started=52906 ms ago, cancelled=false, msg=com.google.protobuf.ServiceException: java.net.ConnectException: Call to localhost/127.0.0.1:16000 failed on connection exception: java.net.ConnectException: Connection refused: no further information
[2022-08-31 10:37:57:809 INFO ] Closing zookeeper sessionid=0x100821143330017
[2022-08-31 10:37:57:875 INFO ] Session: 0x100821143330017 closed
[2022-08-31 10:37:57:875 INFO ] EventThread shut down
[2022-08-31 10:37:57:877 INFO ] LogUtilities.outPut()                              - 数据源创建失败。
[2022-08-31 10:46:00:238 INFO ] Process identifier=hconnection-0x48b6f962 connecting to ZooKeeper ensemble=10.10.10.100:2181
你好,我看你的日志里面的连接地址写的是IP的,你试着在机器上的hosts里加上ip和机器名的映射,在重启idesktopx看看能不能新建成功。

已经加了,各种尝试还是不行,能不能远程帮看下

报错信息里面可以看到有一行关于zookeeper的报错“Will not attempt to authenticate using SASL (unknown error)”,可以从zookeeper排查,针对这个报错网上有很多技术博客可以参考解决,我这边找到两篇,可以根据你那边的搭建情况入手排查:https://blog.csdn.net/m0_46566023/article/details/112666337https://blog.csdn.net/weixin_44344479/article/details/94643156,也可以参考我们的搭建环境技术博客:https://blog.csdn.net/supermapsupport/article/details/91973908和视频搭建步骤详细介绍:http://onlinecourse.edugis.net/#/course/e71a737c6065404a87b9eebd8e10d867

未能解决问题
...