我正在尝试连接到远程HBase服务器。远程服务器在Ubuntu上运行,运行正常,能够使用Hbase客户端(shell)和Java客户端访问它。但是,当我尝试使用相同的Java客户端从Windows机器连接到该服务器时
org.apache.hadoop.conf.Configuration hadoopConf = HBaseConfiguration.create();
hadoopConf.set("hbase.zookeeper.quorum", "Paras-Lenovo");
我收到以下错误:
27 May, 2013 4:03:50 PM org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper <init>
INFO: The identifier of this process is 2964@RDUBEY-PC
27 May, 2013 4:03:51 PM org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation shouldRetryGetMaster
INFO: getMaster attempt 0 of 10 failed; retrying after sleep of 1007
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)
at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:489)
at org.apache.hadoop.hbase.ipc.HBaseClient$Connection.setupConnection(HBaseClient.java:390)
at org.apache.hadoop.hbase.ipc.HBaseClient$Connection.setupIOstreams(HBaseClient.java:436)
at org.apache.hadoop.hbase.ipc.HBaseClient.getConnection(HBaseClient.java:1124)
at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:974)
at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Invoker.invoke(WritableRpcEngine.java:86)
at $Proxy19.getProtocolVersion(Unknown Source)
at org.apache.hadoop.hbase.ipc.WritableRpcEngine.getProxy(WritableRpcEngine.java:138)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:712)
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:126)
at com.alvazan.orm.layer9z.spi.db.hadoop.HadoopSession.start(HadoopSession.java:95)
at com.alvazan.orm.logging.NoSqlRawLogger.start(NoSqlRawLogger.java:291)
at com.alvazan.orm.impl.bindings.BootstrapImpl.createInstanceImpl(BootstrapImpl.java:55)
at com.alvazan.orm.impl.bindings.BootstrapImpl.createInstance(BootstrapImpl.java:36)
at com.alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:65)
at com.alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:60)
at com.alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:57)
at com.alvazan.ssql.cmdline.PlayOrm.main(PlayOrm.java:98)
27 May, 2013 4:03:52 PM org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation shouldRetryGetMaster
INFO: getMaster attempt 1 of 10 failed; retrying after sleep of 1005
org.apache.hadoop.hbase.ipc.HBaseClient$FailedServerException: This server is in the failed servers list: localhost/127.0.0.1:38812
at org.apache.hadoop.hbase.ipc.HBaseClient$Connection.setupIOstreams(HBaseClient.java:425)
at org.apache.hadoop.hbase.ipc.HBaseClient.getConnection(HBaseClient.java:1124)
at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:974)
at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Invoker.invoke(WritableRpcEngine.java:86)
at $Proxy19.getProtocolVersion(Unknown Source)
at org.apache.hadoop.hbase.ipc.WritableRpcEngine.getProxy(WritableRpcEngine.java:138)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:712)
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:126)
at com.alvazan.orm.layer9z.spi.db.hadoop.HadoopSession.start(HadoopSession.java:95)
at com.alvazan.orm.logging.NoSqlRawLogger.start(NoSqlRawLogger.java:291)
请注意窗口主机文件中的条目很好,我可以从Windows机器远程登录60010和2181端口的hbase / zookeper端口,因此问题不在于连接。问题Hbase client do not able to connect with remote Hbase server与此类似,但这也无法解决问题。
答案 0 :(得分:1)
今天我从远程访问客户端访问hbase时遇到了同样的错误,最终解决了问题。只是为了别人的利益而发布变通方法。
我在远程系统中用于hbase java客户端的库与hadoop系统中的库不同。一旦我使用了同一组库,问题就解决了。
答案 1 :(得分:0)
禁用具有hbase服务器的机器的ipv6设置。然后每件事都可以。我有同样的问题bofore。
答案 2 :(得分:0)
我觉得这个讨论主题很有用http://apache-hbase.679495.n3.nabble.com/Where-is-HBase-failed-servers-list-stored-td4068803.html。
如果你确定IP没有改变,其他一切都在使用hbase shell工作正常,那么master的重启应该会有所帮助(这是我的情况)