当前图库版本1.1,使用docker swarm 部署测试环境时,3个graph节点无法启动。
docker stack 文件如下:
version: '3.6'
services:
metad0:
image: vesoft/nebula-metad:v1.0.1
env_file:
- ./nebula.env
command:
- --meta_server_addrs=IP1:45500,IP2:45500,IP3:45500
- --local_ip=IP1
- --ws_ip=IP1
- --port=45500
- --data_path=/data/meta
- --log_dir=/logs
- --v=0
- --minloglevel=2
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.hostname == CS-1155-YQFXY-1
healthcheck:
test: ["CMD", "curl", "-f", "http://IP1:11000/status"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
ports:
- target: 11000
published: 11000
protocol: tcp
mode: host
- target: 11002
published: 11002
protocol: tcp
mode: host
- target: 45500
published: 45500
protocol: tcp
mode: host
volumes:
- data-metad0:/data/meta
- logs-metad0:/logs
networks:
- nebula-net
metad1:
image: vesoft/nebula-metad:v1.0.1
env_file:
- ./nebula.env
command:
- --meta_server_addrs=IP1:45500,IP2:45500,IP3:45500
- --local_ip=IP2
- --ws_ip=IP2
- --port=45500
- --data_path=/data/meta
- --log_dir=/logs
- --v=0
- --minloglevel=2
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.hostname == CS-1155-YQFXYJ-1
healthcheck:
test: ["CMD", "curl", "-f", "http://IP2:11000/status"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
ports:
- target: 11000
published: 11000
protocol: tcp
mode: host
- target: 11002
published: 11002
protocol: tcp
mode: host
- target: 45500
published: 45500
protocol: tcp
mode: host
volumes:
- data-metad1:/data/meta
- logs-metad1:/logs
networks:
- nebula-net
metad2:
image: vesoft/nebula-metad:v1.0.1
env_file:
- ./nebula.env
command:
- --meta_server_addrs=IP1:45500,IP2:45500,IP3:45500
- --local_ip=IP3
- --ws_ip=IP3
- --port=45500
- --data_path=/data/meta
- --log_dir=/logs
- --v=0
- --minloglevel=2
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.hostname == CS-1155-YQFXYJ-2
healthcheck:
test: ["CMD", "curl", "-f", "http://IP3:11000/status"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
ports:
- target: 11000
published: 11000
protocol: tcp
mode: host
- target: 11002
published: 11002
protocol: tcp
mode: host
- target: 45500
published: 45500
protocol: tcp
mode: host
volumes:
- data-metad2:/data/meta
- logs-metad2:/logs
networks:
- nebula-net
storaged0:
image: vesoft/nebula-storaged:v1.0.1
env_file:
- ./nebula.env
command:
- --meta_server_addrs=IP1:45500,IP2:45500,IP3:45500
- --local_ip=IP1
- --ws_ip=IP1
- --port=44500
- --data_path=/data/storage
- --log_dir=/logs
- --v=0
- --minloglevel=2
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.hostname == CS-1155-YQFXY-1
depends_on:
- metad0
- metad1
- metad2
healthcheck:
test: ["CMD", "curl", "-f", "http://IP1:12000/status"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
ports:
- target: 12000
published: 12000
protocol: tcp
mode: host
- target: 12002
published: 12002
protocol: tcp
mode: host
volumes:
- data-storaged0:/data/storage
- logs-storaged0:/logs
networks:
- nebula-net
storaged1:
image: vesoft/nebula-storaged:v1.0.1
env_file:
- ./nebula.env
command:
- --meta_server_addrs=IP1:45500,IP2:45500,IP3:45500
- --local_ip=IP2
- --ws_ip=IP2
- --port=44500
- --data_path=/data/storage
- --log_dir=/logs
- --v=0
- --minloglevel=2
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.hostname == CS-1155-YQFXYJ-1
depends_on:
- metad0
- metad1
- metad2
healthcheck:
test: ["CMD", "curl", "-f", "http://IP2:12000/status"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
ports:
- target: 12000
published: 12000
protocol: tcp
mode: host
- target: 12002
published: 12004
protocol: tcp
mode: host
volumes:
- data-storaged1:/data/storage
- logs-storaged1:/logs
networks:
- nebula-net
storaged2:
image: vesoft/nebula-storaged:v1.0.1
env_file:
- ./nebula.env
command:
- --meta_server_addrs=IP1:45500,IP2:45500,IP3:45500
- --local_ip=IP3
- --ws_ip=IP3
- --port=44500
- --data_path=/data/storage
- --log_dir=/logs
- --v=0
- --minloglevel=2
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.hostname == CS-1155-YQFXYJ-2
depends_on:
- metad0
- metad1
- metad2
healthcheck:
test: ["CMD", "curl", "-f", "http://IP3:12000/status"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
ports:
- target: 12000
published: 12000
protocol: tcp
mode: host
- target: 12002
published: 12006
protocol: tcp
mode: host
volumes:
- data-storaged2:/data/storage
- logs-storaged2:/logs
networks:
- nebula-net
graphd1:
image: vesoft/nebula-graphd:v1.0.1
env_file:
- ./nebula.env
command:
- --meta_server_addrs=IP1:45500,IP2:45500,IP3:45500
- --port=3699
- --ws_ip=IP1
- --log_dir=/logs
- --v=0
- --minloglevel=2
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.hostname == CS-1155-YQFXY-1
depends_on:
- metad0
- metad1
- metad2
healthcheck:
test: ["CMD", "curl", "-f", "http://IP1:13000/status"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
ports:
- target: 3699
published: 3699
protocol: tcp
mode: host
- target: 13000
published: 13000
protocol: tcp
mode: host
- target: 13002
published: 13002
protocol: tcp
mode: host
volumes:
- logs-graphd:/logs
networks:
- nebula-net
graphd2:
image: vesoft/nebula-graphd:v1.0.1
env_file:
- ./nebula.env
command:
- --meta_server_addrs=IP1:45500,IP2:45500,IP3:45500
- --port=3699
- --ws_ip=IP2
- --log_dir=/logs
- --v=2
- --minloglevel=2
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.hostname == CS-1155-YQFXYJ-1
depends_on:
- metad0
- metad1
- metad2
healthcheck:
test: ["CMD", "curl", "-f", "http://IP2:13000/status"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
ports:
- target: 3699
published: 3699
protocol: tcp
mode: host
- target: 13000
published: 13000
protocol: tcp
mode: host
- target: 13002
published: 13002
protocol: tcp
mode: host
volumes:
- logs-graphd2:/logs
networks:
- nebula-net
graphd3:
image: vesoft/nebula-graphd:v1.0.1
env_file:
- ./nebula.env
command:
- --meta_server_addrs=IP1:45500,IP2:45500,IP3:45500
- --port=3699
- --ws_ip=IP3
- --log_dir=/logs
- --v=0
- --minloglevel=2
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.hostname == CS-1155-YQFXYJ-2
depends_on:
- metad0
- metad1
- metad2
healthcheck:
test: ["CMD", "curl", "-f", "http://IP3:13000/status"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
ports:
- target: 3699
published: 3699
protocol: tcp
mode: host
- target: 13000
published: 13000
protocol: tcp
mode: host
- target: 13002
published: 13002
protocol: tcp
mode: host
volumes:
- logs-graphd3:/logs
networks:
- nebula-net
networks:
nebula-net:
external: true
attachable: true
name: host
volumes:
data-metad0:
logs-metad0:
data-metad1:
logs-metad1:
data-metad2:
logs-metad2:
data-storaged0:
logs-storaged0:
data-storaged1:
logs-storaged1:
data-storaged2:
logs-storaged2:
logs-graphd:
logs-graphd2:
logs-graphd3:
启动集群后,发现3个graph均未启动,使用
docker service ps xxx --no-trunc
查看异常信息如下:
Failed 58 seconds ago "starting container failed: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"--meta_server_addrs=ip1:45500,ip2:45500,ip3:45500\": executable file not found in $PATH": unknown"
百度搜索是docker版本与系统版本不一致,但是其他的镜像是可以正常启动的。
