欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

eclipse java连接hbase卡住不动

程序员文章站 2022-05-30 15:07:33
...

问题

 

java连接hbase卡住

这个过程会持续一段时间

<span style="color:#ff0000">log4j:WARN No appenders could be found for logger (org.apache.hadoop.security.Groups).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.</span>

然后就报了异常信息端口无法映射这个端口的错误

xception in thread "main" org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=35, exceptions:
Tue Sep 12 11:25:29 CST 2017, RpcRetryingCaller{globalStartTime=1505186727016, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: java.net.UnknownHostException: node1
Tue Sep 12 11:25:29 CST 2017, RpcRetryingCaller{globalStartTime=1505186727016, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: java.net.UnknownHostException: node1
Tue Sep 12 11:25:29 CST 2017, RpcRetryingCaller{globalStartTime=1505186727016, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: java.net.UnknownHostException: node1
Tue Sep 12 11:25:30 CST 2017, RpcRetryingCaller{globalStartTime=1505186727016, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: java.net.UnknownHostException: node1
Tue Sep 12 11:25:30 CST 2017, RpcRetryingCaller{globalStartTime=1505186727016, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: java.net.UnknownHostException: node1
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:157)

 

解决

 

看了下linux系统下的/etc/hosts 文件  

里面有一段配置

192.168.61.128 node1(IP地址 域名)

将这个配置配置到本地windows或者mac系统下的

C:\Windows\System32\drivers\etc\hosts(windows)

/hosts(mac注意切换成超级管理员登录终端才能修改hosts文件)

 

eclipse java连接hbase卡住不动