gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 22:04:54 33 4
gpt4 key购买 nike

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

WARN zookeeper.ZKUtil: hconnection Unable to set watcher on znode     (/hbase/hbaseid)
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1041)
at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:193)
at org.apache.hadoop.hbase.zookeeper.ZKUtil.checkExists(ZKUtil.java:450)
at org.apache.hadoop.hbase.zookeeper.ClusterId.readClusterIdZNode(ClusterId.java:61)
........

另外,我只在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。
我还有什么需要做或改变的吗?

最佳答案

http://hbase.apache.org/book.html#quickstart这是设置hbase的很好的文档。您可能会缺少一些配置。

关于hadoop - HBase程序无法连接到本地主机上的ZooKeeper,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29136292/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com