Hbase 客户端连接 /hbase 错误的损失
我完全疯了:
已安装Hadoop / Hbase,一切都在运行;
/opt/jdk1.6.0_24/bin/jps
23261 ThriftServer
22582 QuorumPeerMain
21969 NameNode
23500 Jps
23021 HRegionServer
22211 TaskTracker
22891 HMaster
22117 SecondaryNameNode
21779 DataNode
22370 Main
22704 JobTracker
伪分布式环境。
hbase shell
正在工作并提出运行“列表”的正确结果;并且;
hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.90.1-cdh3u0, r, Fri Mar 25 16:10:51 PDT 2011
hbase(main):001:0> status
1 servers, 0 dead, 8.0000 average load
当通过ruby和thrift连接时,一切正常;我们正在添加数据,它进入系统,我们可以查询/扫描它。一切似乎都很好。
但是,当使用 Java 连接时:
groovy> import org.apache.hadoop.hbase.HBaseConfiguration
groovy> import org.apache.hadoop.hbase.client.HBaseAdmin
groovy> conf = HBaseConfiguration.create()
groovy> conf.set("hbase.master","127.0.0.1:60000");
groovy> hbase = new HBaseAdmin(conf);
Exception thrown
org.apache.hadoop.hbase.ZooKeeperConnectionException: org.apache.hadoop.hbase.ZooKeeperConnectionException: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getZooKeeperWatcher(HConnectionManager.java:1000)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:303)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:294)
at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:156)
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:84)
我一直在努力寻找原因,但我真的一点也不知道。所有内容似乎都已正确安装。
netstat -lnp|grep 60000
tcp6 0 0 :::60000 :::* LISTEN 22891/java
看起来也很好。
# telnet localhost 60000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
连接并死亡,如果你键入任何东西+ 输入(不确定这是否是这个想法,9090上的节俭也这样做)。
任何人都可以帮我吗?