You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

MacOS安装Apache Druid时Command[zk]启动失败求助

解决Apache Druid在MacOS上的启动问题

1. 处理./bin/start-druid提示“Please specify memory argument”的问题

start-druid要求明确指定内存配置,直接用官方预定义配置启动是最稳妥的方式:

./bin/start-druid -c conf/druid/single-server/micro-quickstart

也可以手动指定JVM内存参数,比如:

./bin/start-druid -Xmx4g -Xms4g

2. 解决start-micro-quickstart中ZooKeeper反复启动失败的问题

你通过Homebrew安装的独立ZooKeeper,会和Druid micro-quickstart默认启动的内置ZooKeeper端口冲突(默认都是2181),导致内置实例启动失败,有两种解决方式:

方式一:停止本地ZooKeeper,使用Druid内置实例

执行命令停止Homebrew安装的ZooKeeper:

brew services stop zookeeper

重新运行./bin/start-micro-quickstart,内置ZooKeeper即可正常启动。

方式二:让Druid复用本地已安装的ZooKeeper(推荐)

  1. 确保本地ZooKeeper处于运行状态:
    brew services start zookeeper
    
  2. 启动Druid时跳过内置ZooKeeper的启动:
    ./bin/start-micro-quickstart --skip zk
    
  3. 若连接失败,检查conf/druid/single-server/micro-quickstart/_common/common.runtime.properties中的druid.zk.service.host配置,确保值为localhost:2181(和本地ZooKeeper地址一致)。

还可以查看var/sv/zk.log日志文件,里面会有更详细的失败原因,方便进一步排查。

内容的提问来源于stack exchange,提问作者ARAT

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.07 08:12:06