分享

Eclipse访问hbase一直报错 Connection refused: no further information

环境  win7用的eclipse,单个虚拟机,做的伪分布,配置了hadoop2.7.1+hbase1.2.1+hive2.0.0
现在用论坛里面的java链接hbase的例子,报错了,报错信息

Exception in thread "main" org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=35, exceptions:
Wed Aug 31 10:50:37 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:50:37 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: org.apache.hadoop.hbase.ipc.FailedServerException: This server is in the failed servers list: xuniji1/192.168.186.20:16000
Wed Aug 31 10:50:38 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: org.apache.hadoop.hbase.ipc.FailedServerException: This server is in the failed servers list: xuniji1/192.168.186.20:16000
Wed Aug 31 10:50:38 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: org.apache.hadoop.hbase.ipc.FailedServerException: This server is in the failed servers list: xuniji1/192.168.186.20:16000
Wed Aug 31 10:50:40 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:50:43 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:50:48 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:50:59 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:51:10 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:51:21 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:51:32 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:51:53 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:52:14 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:52:36 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:52:57 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:53:18 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:53:39 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:54:00 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:54:21 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:54:42 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:55:03 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:55:24 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:55:45 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:56:07 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:56:28 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:56:49 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:57:10 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:57:31 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:57:52 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:58:13 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:58:34 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:58:56 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:59:17 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:59:38 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
Wed Aug 31 10:59:59 CST 2016, RpcRetryingCaller{globalStartTime=1472611836313, pause=100, retries=35}, org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information

        at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:147)
        at org.apache.hadoop.hbase.client.HBaseAdmin.executeCallable(HBaseAdmin.java:4293)
        at org.apache.hadoop.hbase.client.HBaseAdmin.executeCallable(HBaseAdmin.java:4286)
        at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsyncV2(HBaseAdmin.java:750)
        at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:671)
        at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:604)
        at www.aboutyun.com.hbase.OperateTable.main(OperateTable.java:30)
Caused by: org.apache.hadoop.hbase.MasterNotRunningException: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
        at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$StubMaker.makeStub(ConnectionManager.java:1560)
        at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$MasterServiceStubMaker.makeStub(ConnectionManager.java:1580)
        at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.getKeepAliveMasterService(ConnectionManager.java:1737)
        at org.apache.hadoop.hbase.client.MasterCallable.prepare(MasterCallable.java:38)
        at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:124)
        ... 6 more
Caused by: com.google.protobuf.ServiceException: java.net.ConnectException: Connection refused: no further information
        at org.apache.hadoop.hbase.ipc.AbstractRpcClient.callBlockingMethod(AbstractRpcClient.java:239)
        at org.apache.hadoop.hbase.ipc.AbstractRpcClient$BlockingRpcChannelImplementation.callBlockingMethod(AbstractRpcClient.java:331)
        at org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$BlockingStub.isMasterRunning(MasterProtos.java:58383)
        at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$MasterServiceStubMaker.isMasterRunning(ConnectionManager.java:1591)
        at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$StubMaker.makeStubNoRetries(ConnectionManager.java:1529)
        at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$StubMaker.makeStub(ConnectionManager.java:1551)
        ... 10 more
Caused by: java.net.ConnectException: Connection refused: no further information
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
        at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
        at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:529)
        at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:493)
        at org.apache.hadoop.hbase.ipc.RpcClientImpl$Connection.setupConnection(RpcClientImpl.java:416)
        at org.apache.hadoop.hbase.ipc.RpcClientImpl$Connection.setupIOstreams(RpcClientImpl.java:722)
        at org.apache.hadoop.hbase.ipc.RpcClientImpl$Connection.writeRequest(RpcClientImpl.java:906)
        at org.apache.hadoop.hbase.ipc.RpcClientImpl$Connection.tracedWriteRequest(RpcClientImpl.java:873)
        at org.apache.hadoop.hbase.ipc.RpcClientImpl.call(RpcClientImpl.java:1242)
        at org.apache.hadoop.hbase.ipc.AbstractRpcClient.callBlockingMethod(AbstractRpcClient.java:226)
        ... 15 more


我的虚拟机里面 hadoo,hive,hbase都正常启动着
QQ截图20160831112328.png

这个问题应该怎么解决呢,还有,为啥我看到的链接地址是192.168.186.20:16000呢。

已有(4)人评论

跳转到指定楼层
einhep 发表于 2016-8-31 19:15:55
jyz123456 发表于 2016-8-31 13:53
感谢回答   
win7里面host
192.168.186.20 xuniji1

第一个问题:
win7里面host
192.168.186.20 xuniji1
127.0.0.1 localhost
linux里面host
127.0.0.1   xuniji1 localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6


最好注释掉,并且都配置有192.168.186.20 xuniji1


第二个问题:


版本不一致,让他们使用版本一致就可以了

回复

使用道具 举报

qcbb001 发表于 2016-8-31 13:33:51
存在两个问题
1.可能存在版本问题,当前代码与连接的服务器版本不符
2.hosts解析有问题。可贴出来hosts及相关配置看下
回复

使用道具 举报

jyz123456 发表于 2016-8-31 13:53:15
感谢回答   
win7里面host
192.168.186.20 xuniji1
127.0.0.1 localhost
linux里面host
127.0.0.1   xuniji1 localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

第一个问题倒是很有可能,代码我看他们的例子基本都是版本0.96左右的,我用的1.2.1的,如果真是版本问题,我应该去哪里查找对应的说明文件呢
回复

使用道具 举报

jyz123456 发表于 2016-9-1 10:03:36
感谢 einhep
我把win7里面的 删掉了,
linux里面删了以后添加了 192.168.186.20 xuniji1 localhost
现在可以正常的读取访问数据了,
至于具体的一些修改啥的,还需要再继续重新测试
非常感谢哈
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条