nebula v2-nightly版通过docker swarm部署失败

  • nebula 版本:v2-nightly
  • 部署方式 :分布式
  • 硬件信息
    • 磁盘( 推荐使用 SSD)
    • CPU、内存信息

参照 帖子“nebula v2.0.0-rc1版docker swarm文件配置问题”,
仍然有meta和storage可以启动,但是graph无法启动的问题,不过报错信息不同,通过docker service ps命令查看graph,显示task: non-zero exit (1)

具体如下:

集群信息:

ID                            HOSTNAME   STATUS    AVAILABILITY   MANAGER STATUS   ENGINE VERSION
wfxjdz4ax2p3b3r94fjw79hgp *   drc251     Ready     Active         Leader           20.10.4
nmasfzhebopusazreoyilgm68     drc252     Ready     Active                          20.10.4
nofc71a00zvazcunplvtfe3x7     drc253     Ready     Active                          20.10.4

启动脚本:

version: '3.8'
services:
  metad0:
    image: vesoft/nebula-metad:v2-nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.1.251:9559,192.168.1.252:9559,192.168.1.253:9559
      - --local_ip=192.168.1.251
      - --ws_ip=192.168.1.251
      - --port=9559
      - --data_path=/data/meta
      - --log_dir=/logs
      - --v=0
      - --minloglevel=2
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.hostname == drc251
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.1.251:19559/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s      
    ports:
      - target: 19559
        published: 19559
        protocol: tcp
        mode: host
      - target: 19560
        published: 19560
        protocol: tcp
        mode: host
      - target: 9559
        published: 9559
        protocol: tcp
        mode: host
    volumes:
      - /data/nebula/data/meta:/data/meta
      - /data/nebula/logs/meta:/logs
    networks:
      - nebula-net

  metad1:
    image: vesoft/nebula-metad:v2-nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.1.251:9559,192.168.1.252:9559,192.168.1.253:9559
      - --local_ip=192.168.1.252
      - --ws_ip=192.168.1.252
      - --port=9559
      - --data_path=/data/meta
      - --log_dir=/logs
      - --v=0
      - --minloglevel=2
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.hostname == drc252
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.1.252:19559/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s     
    ports:
      - target: 19559
        published: 19559
        protocol: tcp
        mode: host
      - target: 19560
        published: 19560
        protocol: tcp
        mode: host
      - target: 9559
        published: 9559
        protocol: tcp
        mode: host
    volumes:
      - /data/nebula/data/meta:/data/meta
      - /data/nebula/logs/meta:/logs
    networks:
      - nebula-net

  metad2:
    image: vesoft/nebula-metad:v2-nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.1.251:9559,192.168.1.252:9559,192.168.1.253:9559
      - --local_ip=192.168.1.253
      - --ws_ip=192.168.1.253
      - --port=9559
      - --data_path=/data/meta
      - --log_dir=/logs
      - --v=0
      - --minloglevel=2
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.hostname == drc253
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.1.253:19559/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s      
    ports:
      - target: 19559
        published: 19559
        protocol: tcp
        mode: host
      - target: 19560
        published: 19560
        protocol: tcp
        mode: host
      - target: 9559
        published: 9559
        protocol: tcp
        mode: host
    volumes:
      - /data/nebula/data/meta:/data/meta
      - /data/nebula/logs/meta:/logs
    networks:
      - nebula-net

  storaged0:
    image: vesoft/nebula-storaged:v2-nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.1.251:9559,192.168.1.252:9559,192.168.1.253:9559
      - --local_ip=192.168.1.251
      - --ws_ip=192.168.1.251
      - --port=9779
      - --data_path=/data/storaged
      - --log_dir=/logs
      - --v=0
      - --minloglevel=2
      - --raft_rpc_timeout_ms=5000
      - --heartbeat_interval_secs=30
      - --enable_rocksdb_prefix_filtering=true	  
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.hostname == drc251
    depends_on:
      - metad0
      - metad1
      - metad2
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.1.251:19779/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s      
    ports:
      - target: 19779
        published: 19779
        protocol: tcp
        mode: host
      - target: 19780
        published: 19780
        protocol: tcp
        mode: host
      - target: 9779
        published: 9779
        protocol: tcp
        mode: host
    volumes:
      - /data/nebula/data/storaged:/data/storaged
      - /data/nebula/logs/storaged:/logs
    networks:
      - nebula-net
      
  storaged1:
    image: vesoft/nebula-storaged:v2-nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.1.251:9559,192.168.1.252:9559,192.168.1.253:9559
      - --local_ip=192.168.1.252
      - --ws_ip=192.168.1.252
      - --port=9779
      - --data_path=/data/storaged
      - --log_dir=/logs
      - --v=0
      - --minloglevel=2
      - --raft_rpc_timeout_ms=5000
      - --heartbeat_interval_secs=30
      - --enable_rocksdb_prefix_filtering=true
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.hostname == drc252
    depends_on:
      - metad0
      - metad1
      - metad2
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.1.252:19779/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s      
    ports:
      - target: 19779
        published: 19779
        protocol: tcp
        mode: host
      - target: 19780
        published: 19780
        protocol: tcp
        mode: host
      - target: 9779
        published: 9779
        protocol: tcp
        mode: host
    volumes:
      - /data/nebula/data/storaged:/data/storaged
      - /data/nebula/logs/storaged:/logs
    networks:
      - nebula-net

  storaged2:
    image: vesoft/nebula-storaged:v2-nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.1.251:9559,192.168.1.252:9559,192.168.1.253:9559
      - --local_ip=192.168.1.253
      - --ws_ip=192.168.1.253
      - --port=9779
      - --data_path=/data/storaged
      - --log_dir=/logs
      - --v=0
      - --minloglevel=2
      - --raft_rpc_timeout_ms=5000
      - --heartbeat_interval_secs=30
      - --enable_rocksdb_prefix_filtering=true
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.hostname == drc253
    depends_on:
      - metad0
      - metad1
      - metad2
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.1.253:19779/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s      
    ports:
      - target: 19779
        published: 19779
        protocol: tcp
        mode: host
      - target: 19780
        published: 19780
        protocol: tcp
        mode: host
      - target: 9779
        published: 9779
        protocol: tcp
        mode: host
    volumes:
      - /data/nebula/data/storaged:/data/storaged
      - /data/nebula/logs/storaged:/logs
    networks:
      - nebula-net
      
  graphd0:
    image: vesoft/nebula-graphd:v2-nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.1.251:9559,192.168.1.252:9559,192.168.1.253:9559
      - --port=9669
      - --ws_ip=192.168.1.251
      - --log_dir=/logs
      - --v=0
      - --minloglevel=2
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.hostname == drc251
    depends_on:
      - metad0
      - metad1
      - metad2
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.1.251:19669/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s      
    ports:
      - target: 9669
        published: 9669
        protocol: tcp
        mode: host
      - target: 19669
        published: 19669
        protocol: tcp
        mode: host
      - target: 19670
        published: 19670
        protocol: tcp
        mode: host
    volumes:
      - /data/nebula/logs/graphd:/logs
      - /data/nebula/config:/usr/local/nebula/etc
    networks:
      - nebula-net

  graphd1:
    image: vesoft/nebula-graphd:v2-nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.1.251:9559,192.168.1.252:9559,192.168.1.253:9559
      - --port=9669
      - --ws_ip=192.168.1.252
      - --log_dir=/logs
      - --v=2
      - --minloglevel=2
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.hostname == drc252
    depends_on:
      - metad0
      - metad1
      - metad2
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.1.252:19669/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s      
    ports:
      - target: 9669
        published: 9669
        protocol: tcp
        mode: host
      - target: 19669
        published: 19669
        protocol: tcp
        mode: host
      - target: 19670
        published: 19670
        protocol: tcp
        mode: host
    volumes:
      - /data/nebula/logs/graphd:/logs
      - /data/nebula/config:/usr/local/nebula/etc
    networks:
      - nebula-net
      
  graphd2:
    image: vesoft/nebula-graphd:v2-nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.1.251:9559,192.168.1.252:9559,192.168.1.253:9559
      - --port=9669
      - --ws_ip=192.168.1.253
      - --log_dir=/logs
      - --v=0
      - --minloglevel=2
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.hostname == drc253
    depends_on:
      - metad0
      - metad1
      - metad2
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.1.253:19669/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s      
    ports:
      - target: 9669
        published: 9669
        protocol: tcp
        mode: host
      - target: 19669
        published: 19669
        protocol: tcp
        mode: host
      - target: 19670
        published: 19670
        protocol: tcp
        mode: host
    volumes:
      - /data/nebula/logs/graphd:/logs
      - /data/nebula/config:/usr/local/nebula/etc
    networks:
      - nebula-net
      
networks:
  nebula-net:
    external: true
    attachable: true
    name: host

返回信息

docker service ps st  --no-trunc
ID                          NAME                   IMAGE                                                                                                     NODE      DESIRED STATE   CURRENT STATE           ERROR                       PORTS
btqsczqqb66e1vwuj8w3yaboj   nebula_graphd0.1       vesoft/nebula-graphd:v2-nightly@sha256:b05990fc43438130add2a84bc50bcfbb815816167b8a555523add9a97985c403   drc251    Ready           Ready 1 second ago                                  
nf6bb6o4an6i7cdlpme26fahu    \_ nebula_graphd0.1   vesoft/nebula-graphd:v2-nightly@sha256:b05990fc43438130add2a84bc50bcfbb815816167b8a555523add9a97985c403   drc251    Shutdown        Failed 2 seconds ago    "task: non-zero exit (1)"   
4etkfx7zla2jm7j4lcbt3tvdx    \_ nebula_graphd0.1   vesoft/nebula-graphd:v2-nightly@sha256:b05990fc43438130add2a84bc50bcfbb815816167b8a555523add9a97985c403   drc251    Shutdown        Failed 7 seconds ago    "task: non-zero exit (1)"   
yum6vg84emivac4vwk5wsqi8o    \_ nebula_graphd0.1   vesoft/nebula-graphd:v2-nightly@sha256:b05990fc43438130add2a84bc50bcfbb815816167b8a555523add9a97985c403   drc251    Shutdown        Failed 13 seconds ago   "task: non-zero exit (1)"   
ir6j8n6tuyr9b0kemt199ncoo    \_ nebula_graphd0.1   vesoft/nebula-graphd:v2-nightly@sha256:b05990fc43438130add2a84bc50bcfbb815816167b8a555523add9a97985c403   drc251    Shutdown        Failed 18 seconds ago   "task: non-zero exit (1)" 

请帮忙看下

参考这个文件来配置,更改地址和主机名即可

多谢,我试试

@kevin.qiao 这个yml还是v1版本的,请问有没有v2的呢

更改镜像版本即可 image: vesoft/nebula-metad:v2-nightly,对v1,v2都能用

好的

浙ICP备20010487号