开发者社区> 问答> 正文

使用java 开发连接 Hbase程序,出现连接之后永久等待?报错

window下 开发的日志如下

14-11-25.17:10:28.904 [main-SendThread(CentOs-PC:2181)] INFO  ClientCnxn             - Opening socket connection to server CentOs-PC/192.168.56.102:2181. Will not attempt to authenticate using SASL (无法定位登录配置)
14-11-25.17:10:28.908 [main-SendThread(CentOs-PC:2181)] INFO  ClientCnxn             - Socket connection established to CentOs-PC/192.168.56.102:2181, initiating session
14-11-25.17:10:28.927 [main-SendThread(CentOs-PC:2181)] INFO  ClientCnxn             - Session establishment complete on server CentOs-PC/192.168.56.102:2181, sessionid = 0x149e60f8b090009, negotiated timeout = 40000



192.168.56.102 是我的虚拟机,在windows 配置了hosts 192.168.56.102 CentOs-PC


虚拟机 Hbase 的日志如下

2014-11-25 17:10:27,559 INFO org.apache.zookeeper.server.NIOServerCnxnFactory: Accepted socket connection from /192.168.56.101:50299
2014-11-25 17:10:27,567 INFO org.apache.zookeeper.server.ZooKeeperServer: Client attempting to establish new session at /192.168.56.101:50299
2014-11-25 17:10:27,573 INFO org.apache.zookeeper.server.ZooKeeperServer: Established session 0x149e60f8b090009 with negotiated timeout 40000 for client /192.168.56.101:50299
2014-11-25 17:10:42,001 INFO org.apache.zookeeper.server.ZooKeeperServer: Expiring session 0x149e60f8b090008, timeout of 40000ms exceeded
2014-11-25 17:10:42,001 INFO org.apache.zookeeper.server.PrepRequestProcessor: Processed session termination for sessionid: 0x149e60f8b090008

linux 也配置了 hosts 192.168.56.102 CentOs-PC

现在是程序永远卡着最后那句日志不动了,很长时间之后也不会报错,一直卡在那里,求大神指点是什么原因,在线请求帮助

展开
收起
爱吃鱼的程序员 2020-06-14 19:58:11 894 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    请问问题解决了吗,我也遇到同样的情况麻烦问下 最后解决这个问题了吗 我最近也遇到这种情况请问楼主解决了吗?求方案啊

    回复楼上各位,我的环境也出现过这个问题,有两个原因导致的:

    1.本地环境没有配置regionServers的host

    2.本地环境hbase1.2.1错用了hadoop-core.jar,应该使用hadoop2版本的jar

    楼主解决了吗

     

    2020-06-14 19:58:30
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
大数据时代的存储 ——HBase的实践与探索 立即下载
Hbase在滴滴出行的应用场景和最佳实践 立即下载
阿里云HBase主备双活 立即下载