HBase报错:KeeperErrorCode = ConnectionLoss for /hbase

时间:2025-04-12 07:49:34

问题描述:

单机模式安装HBase,安装步骤参考 /cdh5/cdh/5/hbase-0.98.6-cdh5.3.3/book/
bin/启动HBase后,查看日志信息,异常信息大致意思为不能连接zookeeperhbase连接丢失

 

报错信息:

2015-12-29 11:11:15,927 INFO  [main] : server localhost:2181 not up : Connection refused

2015-12-29 11:23:43,277 ERROR [main] $HConnectionImplementation: Can't get connection to ZooKeeper: KeeperErrorCode = ConnectionLoss for /hbase

出错原因:

zookeeper未找到localhost:2181这个连接

 

解决方案:

需要在 /etc/hosts 配置localhost,具体配置如下:

127.0.0.1          localhost

重启hbase,问题解决!