hbase 无法定位登录配置


在XP eclipse中 做J2ee程序连接到 远程 Hbase 。出现异常:

[cpt-service]16:34:47,851 INFO ZooKeeper:100 - Client environment:java.io.tmpdir=/home/hadoop/apache-tomcat-6/apache-tomcat-6.0.37/temp[cpt-service]16:34:47,852 INFO ZooKeeper:100 - Client environment:java.compiler=<NA>[cpt-service]16:34:47,852 INFO ZooKeeper:100 - Client environment:os.name=Linux[cpt-service]16:34:47,852 INFO ZooKeeper:100 - Client environment:os.arch=i386[cpt-service]16:34:47,853 INFO ZooKeeper:100 - Client environment:os.version=2.6.18-prep[cpt-service]16:34:47,853 INFO ZooKeeper:100 - Client environment:user.name=hadoop[cpt-service]16:34:47,853 INFO ZooKeeper:100 - Client environment:user.home=/home/hadoop[cpt-service]16:34:47,854 INFO ZooKeeper:100 - Client environment:user.dir=/home/hadoop/apache-tomcat-6/apache-tomcat-6.0.37/logs[cpt-service]16:34:47,856 INFO ZooKeeper:438 - Initiating client connection, connectString=node192:2181,node198:2181,node152:2181 sessionTimeout=180000 watcher=hconnection[cpt-service]16:34:47,862 DEBUG ClientCnxn:99 - zookeeper.disableAutoWatchReset is false[cpt-service]16:34:47,894 INFO RecoverableZooKeeper:104 - The identifier of this process is 6728@node198[cpt-service]16:34:47,900 INFO ClientCnxn:966 - Opening socket connection to server node198/10.2.0.198:2181. Will not attempt to authenticate using SASL (无法定位登录配置)[cpt-service]16:34:47,906 INFO ClientCnxn:849 - Socket connection established to node198/10.2.0.198:2181, initiating session[cpt-service]16:34:47,907 DEBUG ClientCnxn:889 - Session establishment request sent on node198/10.2.0.198:2181[cpt-service]16:34:47,907 DEBUG ZooKeeperSaslClient:519 - Could not retrieve login configuration: java.lang.SecurityException: 无法定位登录配置[cpt-service]16:34:47,909 DEBUG ZooKeeperSaslClient:519 - Could not retrieve login configuration: java.lang.SecurityException: 无法定位登录配置[cpt-service]16:34:47,913 INFO ClientCnxn:1207 - Session establishment complete on server node198/10.2.0.198:2181, sessionid = 0x40a7f8343b002d, negotiated timeout = 180000[cpt-service]16:34:47,915 DEBUG ZooKeeperSaslClient:519 - Could not retrieve login configuration: java.lang.SecurityException: 无法定位登录配置[cpt-service]16:34:47,916 DEBUG ZooKeeperWatcher:294 - hconnection Received ZooKeeper Event, type=None, state=SyncConnected, path=null[cpt-service]16:34:47,916 DEBUG ZooKeeperSaslClient:519 - Could not retrieve login configuration: java.lang.SecurityException: 无法定位登录配置[cpt-service]16:34:47,916 DEBUG ZooKeeperSaslClient:519 - Could not retrieve login configuration: java.lang.SecurityException: 无法定位登录配置[cpt-service]16:34:47,917 DEBUG ZooKeeperSaslClient:519 - Could not retrieve login configuration: java.lang.SecurityException: 无法定位登录配置[cpt-service]16:34:47,920 DEBUG ZooKeeperWatcher:371 - hconnection-0x40a7f8343b002d connected



折腾了好久,总结下解决方案:

1、 配置hosts

由于Hbase是通过hostname解析IP地址的(DNS)Zookeeper只会返回Hbase的域名,需要客户端通过DNS或本地hosts文件进行解析。

若为Linux,在/etc/hosts文件中添加Hbase Master节点的域名及IP地址映射

若为Windows,修改C:\Windows\system32\etc\hosts文件,添加Hbase Master节点的域名及IP地址映射。

2、做完这部继续运行

还有错误,看控制台信息,报:protobuf-java-2.4.0a.jar 该包未找到。去hbase server上将该包下载下来,加入 classpath ,运行,Debug中还有上述异常,但在最后可以查询出hbase中的值。

3、将Log4J配置文件改为 INFO级别。继续运行。异常信息没有。

4、将 protobuf-java.jar 删除,继续运行该项目,也不抱异常了。查询一切正常。真奇怪。

mark下。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值