【HBase】:Could not start ZK with 3 ZK servers in local mode deployment.

发布时间 2023-12-29 15:17:14作者: sober_zero

Could not start ZK with 3 ZK servers in local mode deployment. Aborting as clients (e.g. shell) will not be able to find this ZK quorum.

控制台报错:

image

这个错误表明在启动 HBase 时,尝试以本地模式部署(local mode deployment)的方式启动 ZooKeeper 失败。HBase 中的 ZooKeeper 通常用于协调分布式系统的配置信息。在本地模式下,ZooKeeper 服务是以本地模式运行的,而不是通过分布式 ZooKeeper 集群。

解决方法:

ZooKeeper 未正确配置或未配置: 检查 HBase 的配置文件,确保 hbase-site.xml 中的 ZooKeeper 相关配置项正确设置。

<property>
  <name>hbase.cluster.distributed</name>
  <value>false</value>
</property>

修改后,启动HBase,报错消失,启动成功!
image

正常启动后在hbase shell中查看命名空间:

hbase shell
list_namespace

image