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

MacBook Air M1上Docker Vertica CE无法创建VMart数据库求助

问题

在MacBook Air M1设备上,安装vertica/vertica-ce Docker镜像后,按官方指引运行独立容器时无法创建VMart数据库。Docker日志显示节点持续处于DOWN状态,且多次出现vsql: could not connect to server: Cannot assign requested address错误。

Docker日志

VERTICA_DB_USER is "dbadmin"

Starting up

Moving config directory tree to persistent store

symlink /opt/vertica/config -> /data/vertica/config

Creating database

Info: no password specified, using none

Database with 1 or 2 nodes cannot be k-safe and it may lose data if it crashes

Distributing changes to cluster.

Creating database VMart

Starting bootstrap node v_vmart_node0001 (127.0.0.1)

Starting nodes:

v_vmart_node0001 (127.0.0.1)

Starting Vertica on all nodes. Please wait, databases with a large catalog may take a while to initialize.

Node Status: v_vmart_node0001: (DOWN)

Node Status: v_vmart_node0001: (DOWN)

Node Status: v_vmart_node0001: (DOWN)

Node Status: v_vmart_node0001: (DOWN)

Node Status: v_vmart_node0001: (DOWN)

Node Status: v_vmart_node0001: (DOWN)

Node Status: v_vmart_node0001: (DOWN)

Node Status: v_vmart_node0001: (DOWN)

Node Status: v_vmart_node0001: (DOWN)

Node Status: v_vmart_node0001: (DOWN)

ERROR: Database did not start cleanly on initiator node!

Stopping all nodes

Error: Database did not start cleanly on initiator node! Stopping all nodes


Loading VMart schema ...

Dropping old schema ...

Generating data ...

datadirectory = ./

numfiles = 1

seed = 20177

null = ''

timefile = Time_custom.txt

numfactsalesrows = 5000000

vsql: could not connect to server: Cannot assign requested address

Is the server running on host "???" and accepting

TCP/IP connections on port 5433?

vsql: could not connect to server: Cannot assign requested address

Is the server running on host "???" and accepting

TCP/IP connections on port 5433?

numfactorderrows = 300000

numprodkeys = 500

numstorekeys = 50

numpromokeys = 100

numvendkeys = 50

numcustkeys = 50000

numempkeys = 10000

numwarehousekeys = 100

numshippingkeys = 100

numonlinepagekeys = 1000

numcallcenterkeys = 200

numfactonlinesalesrows = 5000000

numinventoryfactrows = 300000

gen_load_script = false

years = 2003 to 2023

Data Generated successfully !

Creating schema ...

Loading files ...

Running ETL ...

Confirm successful load


Starting MC agent


Vertica is now running

vsql: could not connect to server: Cannot assign requested address

Is the server running on host "???" and accepting

TCP/IP connections on port 5433?

vsql: could not connect to server: Cannot assign requested address

Is the server running on host "???" and accepting

TCP/IP connections on port 5433?

vsql: could not connect to server: Cannot assign requested address

Is the server running on host "???" and accepting

TCP/IP connections on port 5433?

vsql: could not connect to server: Cannot assign requested address

Is the server running on host "???" and accepting

TCP/IP connections on port 5433?

解决建议

1. 启用Rosetta转译支持

M1为ARM64架构,Vertica CE镜像默认适配AMD64,需通过Rosetta转译才能正常运行:

  • 打开Docker Desktop设置,进入Features in development选项卡
  • 勾选Use Rosetta for x86/amd64 emulation on Apple Silicon
  • 重启Docker后重新启动容器

2. 调整容器启动的网络配置

日志中的地址分配错误源于默认绑定127.0.0.1,需修改启动命令明确绑定宿主机所有地址:

docker run -p 0.0.0.0:5433:5433 \
  -e VERTICA_DB_NAME=VMart \
  -e VERTICA_DB_USER=dbadmin \
  -v vertica-data:/data \
  --name vertica-ce \
  vertica/vertica-ce

3. 清理损坏的持久化数据

若之前启动失败留下损坏数据,会导致后续初始化异常:

  • 停止并删除容器:docker stop vertica-ce && docker rm vertica-ce
  • 删除关联数据卷:docker volume rm vertica-data
  • 重新执行上述启动命令

4. 手动初始化VMart数据库

自动初始化失败时,可手动进入容器执行初始化:

  • 启动容器并进入bash:
docker run -p 5433:5433 \
  -v vertica-data:/data \
  --name vertica-ce \
  vertica/vertica-ce /bin/bash
  • 进入容器终端:docker exec -it vertica-ce bash
  • 切换到dbadmin用户:su - dbadmin
  • 创建数据库:createdb VMart
  • 运行VMart初始化脚本:/opt/vertica/bin/vmart_gen

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.17 13:55:16