我已经在Linux机器上安装了HBase(192.168.1.000),现在我已经在Eclipse IDE中使用JAVA API与HBase进行通信并且工作正常但在相同的Linux机器上编写了一些示例代码,当我在相同版本的Ecliple IDE的Windows机器上写入相同的java代码以与Linux机器上的HBase(192.168.1.000)进行通信时。我:无法通过java代码远程连接Hbase
14/12/02 15:42:40 INFO client.ZooKeeperSaslClient: Client will not SASL-authenticate because the default JAAS configuration section 'Client' could not be found. If you are not using SASL, you may ignore this. On the other hand, if you expected SASL to work, please fix your JAAS configuration.
14/12/02 15:42:40 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.BindException: Cannot assign requested address: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:286)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1035)
14/12/02 15:42:40 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
14/12/02 15:42:40 INFO util.RetryCounter: The 1 times to retry after sleeping 2000 ms
,而我的代码是:
Configuration config = HBaseConfiguration.create();
config.clear();
config.set("hbase.zookeeper.quorum", "192.168.1.000");
config.set("hbase.zookeeper.property.clientPort","2181");
config.set("hbase.master", "192.168.1.000:60030");
HBaseAdmin hbAdmin = new HBaseAdmin(config);`enter code here`
请帮我从这里出去:
在此先感谢 阿比纳夫·库马尔
您确定这是正确的IP地址吗? – atok 2014-12-02 10:27:43