问题描述:

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

 

报错信息:

2015-12-29 11:11:15,927 INFO  [main] zookeeper.MiniZooKeeperCluster: server localhost:2181 not up java.net.ConnectException: Connection refused

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

出错原因:

zookeeper未找到localhost:2181这个连接

 

解决方案:

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

127.0.0.1       localhost.localdomain   localhost

重启hbase,问题解决! 



Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐