Hadoop HBase程序无法连接到本地主机上的ZooKeeper

Hadoop HBase程序无法连接到本地主机上的ZooKeeper,hadoop,hbase,apache-zookeeper,Hadoop,Hbase,Apache Zookeeper,我是HBase新手,我确信我已正确安装了它。在我的终端上,我也可以启动hbase shell,但即使是一个简单的create语句也会出现以下错误: (注意:我尝试在独立模式下运行它) 另外,我在eclipse中只写了2行代码,我试着运行它 public static void main(String[] args) throws MasterNotRunningException, ZooKeeperConnectionException { // TODO Auto-generated

我是HBase新手,我确信我已正确安装了它。在我的终端上,我也可以启动hbase shell,但即使是一个简单的create语句也会出现以下错误: (注意:我尝试在独立模式下运行它)

另外,我在eclipse中只写了2行代码,我试着运行它

public static void main(String[] args) throws MasterNotRunningException, ZooKeeperConnectionException {
    // TODO Auto-generated method stub

    Configuration config = HBaseConfiguration.create();

    HBaseAdmin admin = new HBaseAdmin(config);
}
它给了我以下错误:

15/03/18 22:25:37 INFO zookeeper.ClientCnxn: Opening socket connection to server fe80:0:0:0:0:0:0:1%1/fe80:0:0:0:0:0:0:1%1:2181. Will not attempt to authenticate using SASL (Unable to locate a login configuration)
15/03/18 22:25:38 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
可能是什么问题? 我的/etc/hosts文件是127.0.0.1 localhost。
还有什么我需要做或更改的吗?

这里是设置hbase的非常好的文档。您可能缺少一些配置

做了教程上说的一切。我想这是动物园管理员的问题。你能分享一下配置吗?挖掘问题会更容易一些这方面有什么新闻吗?我这里也有同样的问题。如果不包括zookeeper和hbase的配置文件,任何人都很难帮助您。
15/03/18 22:25:37 INFO zookeeper.ClientCnxn: Opening socket connection to server fe80:0:0:0:0:0:0:1%1/fe80:0:0:0:0:0:0:1%1:2181. Will not attempt to authenticate using SASL (Unable to locate a login configuration)
15/03/18 22:25:38 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)