`
qindongliang1922
  • 浏览: 2151333 次
  • 性别: Icon_minigender_1
  • 来自: 北京
博客专栏
7265517b-f87e-3137-b62c-5c6e30e26109
证道Lucene4
浏览量:116437
097be4a0-491e-39c0-89ff-3456fadf8262
证道Hadoop
浏览量:124694
41c37529-f6d8-32e4-8563-3b42b2712a50
证道shell编程
浏览量:58648
43832365-bc15-3f5d-b3cd-c9161722a70c
ELK修真
浏览量:70473
社区版块
存档分类
最新评论

Hbase异常(无法定位登录配置)

阅读更多
散仙,最近再用Sqoop从Mysql数据库里向Hbase里导入数据,导入成功后,在eclipse上使用Java Hbase API的连接集群,打印所有数据,结果一运行程序,日志显示无法定位登录配置,具体信息如下:

2013/12/29-02:20:46  INFO ZooKeeper:100 - Client environment:java.library.path=D:\soft\Java\jdk1.6.0_32\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:/soft/Java/jdk1.7.0_04/bin/../jre/bin/server;D:/soft/Java/jdk1.7.0_04/bin/../jre/bin;D:/soft/Java/jdk1.7.0_04/bin/../jre/lib/amd64;D:\Python;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;D:\soft\Java\jdk1.7.0_04/bin;D:\soft\Java\jdk1.7.0_04/jre/bin ;E:\SSHClient;D:\soft\eclipse;;.
2013/12/29-02:20:46  INFO ZooKeeper:100 - Client environment:java.io.tmpdir=C:\Users\qin\AppData\Local\Temp\
2013/12/29-02:20:46  INFO ZooKeeper:100 - Client environment:java.compiler=<NA>
2013/12/29-02:20:46  INFO ZooKeeper:100 - Client environment:os.name=Windows 7
2013/12/29-02:20:46  INFO ZooKeeper:100 - Client environment:os.arch=amd64
2013/12/29-02:20:46  INFO ZooKeeper:100 - Client environment:os.version=6.1
2013/12/29-02:20:46  INFO ZooKeeper:100 - Client environment:user.name=qin
2013/12/29-02:20:46  INFO ZooKeeper:100 - Client environment:user.home=C:\Users\qin
2013/12/29-02:20:46  INFO ZooKeeper:100 - Client environment:user.dir=D:\eclipseworkspace\myfirst
2013/12/29-02:20:46  INFO ZooKeeper:438 - Initiating client connection, connectString=192.168.120.129:2181 sessionTimeout=180000 watcher=hconnection
2013/12/29-02:20:46  INFO RecoverableZooKeeper:104 - The identifier of this process is 9308@qin-PC
2013/12/29-02:20:46  INFO ClientCnxn:966 - Opening socket connection to server namenode/192.168.120.129:2181. Will not attempt to authenticate using SASL (无法定位登录配置)


其实这个信息,并不是Hbase的异常,而是客户端找不到zookeeper的解析地址,由于Hbase是通过hostname解析IP地址的(DNS),Zookeeper只会返回Hbase的域名,需要客户端通过DNS或本地hosts文件进行解析。
解决办法:
在Linux上,在/etc/hosts文件中添加Hbase Master节点的域名及IP地址映射,
在Windows上,修改C:\Windows\system32\etc\hosts文件,添加Hbase Master节点的域名及IP地址映射。
截图如下:








至此,就可以正常使用了,再次启动程序,已经发现没有刚才的问题了


  • 大小: 8.7 KB
  • 大小: 34.7 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics