集群部署 graph节点无法正常启动

看你第一张截图,暴露出来的graphd端口是13000,13003,13004,配置文件里检查的status端口号是13000,13001,13002,把这个修正后再测试看看

1 个赞

我晚点会看一下,谢谢!

同题主一样,仍然存在相同问题,在节点2测试输出如下,没有启动graph:

# docker ps
CONTAINER ID        IMAGE                            COMMAND                  CREATED             STATUS                    PORTS               NAMES
a5a44f95735f        vesoft/nebula-metad:nightly      "./bin/nebula-metad …"   13 minutes ago      Up 13 minutes (healthy)                       nebula_metad1.1.chfc5qzworcbpu3tghn5brya8
7683e3573646        vesoft/nebula-storaged:nightly   "./bin/nebula-storag…"   13 minutes ago      Up 13 minutes (healthy)                       nebula_storaged1.1.2bmzq4qsvfnexsulu2ac0r712

节点一测试结果如下,同题主一样:

# docker service ls
ID                  NAME                MODE                REPLICAS            IMAGE                            PORTS
3ay6bj49zqlg        nebula_graphd0      replicated          0/1                 vesoft/nebula-graphd:nightly     *:13000->13000/tcp
07vpdix471me        nebula_graphd1      replicated          0/1                 vesoft/nebula-graphd:nightly     *:13003->13002/tcp
yzz7qxjyeqa6        nebula_graphd2      replicated          0/1                 vesoft/nebula-graphd:nightly     *:13004->13000/tcp
zojltptyi9nq        nebula_metad0       replicated          1/1                 vesoft/nebula-metad:nightly
ws7r7oxjd4v3        nebula_metad1       replicated          1/1                 vesoft/nebula-metad:nightly
dajatrqkv8ty        nebula_metad2       replicated          1/1                 vesoft/nebula-metad:nightly
qcnv5o5smf0i        nebula_storaged0    replicated          1/1                 vesoft/nebula-storaged:nightly
drm3f4nfpqqx        nebula_storaged1    replicated          1/1                 vesoft/nebula-storaged:nightly
jm91a08465dn        nebula_storaged2    replicated          1/1                 vesoft/nebula-storaged:nightly

在yml文件中已经将13000,13003,13004,修改为13000,13001,13002,仍然不行。

配置文件内容如下:

version: '3.6'
services:
  metad0:
    image: vesoft/nebula-metad:nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.4.172:45500,192.168.4.173:45500,192.168.4.174:45500
      - --local_ip=192.168.4.172
      - --ws_ip=192.168.4.172
      - --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 == node172
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.4.172: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:nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.4.172:45500,192.168.4.173:45500,192.168.4.174:45500
      - --local_ip=192.168.4.173
      - --ws_ip=192.168.4.173
      - --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 == node173
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.4.173: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:nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.4.172:45500,192.168.4.173:45500,192.168.4.174:45500
      - --local_ip=192.168.4.174
      - --ws_ip=192.168.4.174
      - --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 == node174
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.4.174: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:nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.4.172:45500,192.168.4.173:45500,192.168.4.174:45500
      - --local_ip=192.168.4.172
      - --ws_ip=192.168.4.172
      - --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 == node172
    depends_on:
      - metad0
      - metad1
      - metad2
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.4.172: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:nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.4.172:45500,192.168.4.173:45500,192.168.4.174:45500
      - --local_ip=192.168.4.173
      - --ws_ip=192.168.4.173
      - --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 == node173
    depends_on:
      - metad0
      - metad1
      - metad2
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.4.173: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:nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.4.172:45500,192.168.4.173:45500,192.168.4.174:45500
      - --local_ip=192.168.4.174
      - --ws_ip=192.168.4.174
      - --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 == node174
    depends_on:
      - metad0
      - metad1
      - metad2
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.4.174: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
  graphd0:
    image: vesoft/nebula-graphd:nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.4.172:45500,192.168.4.173:45500,192.168.4.174:45500
      - --port=3699
      - --ws_ip=192.168.4.172
      - --log_dir=/logs
      - --v=0
      - --minloglevel=2
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.hostname == node172
    depends_on:
      - metad0
      - metad1
      - metad2
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.4.172: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

  graphd1:
    image: vesoft/nebula-graphd:nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.4.172:45500,192.168.4.173:45500,192.168.4.174:45500
      - --port=3699
      - --ws_ip=192.168.4.173
      - --log_dir=/logs
      - --v=2
      - --minloglevel=2
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.hostname == node173
    depends_on:
      - metad0
      - metad1
      - metad2
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.4.173:13003/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    ports:
      - target: 3699
        published: 3640
        protocol: tcp
        mode: host
      - target: 13000
        published: 13001
        protocol: tcp
        mode: host
      - target: 13002
        published: 13003
        protocol: tcp
#        mode: host
    volumes:
      - logs-graphd2:/logs
    networks:
      - nebula-net
  graphd2:
    image: vesoft/nebula-graphd:nightly
    env_file:
      - ./nebula.env
    command:
      - --meta_server_addrs=192.168.4.172:45500,192.168.4.173:45500,192.168.4.174:45500
      - --port=3699
      - --ws_ip=192.168.4.174
      - --log_dir=/logs
      - --v=0
      - --minloglevel=2
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.hostname == node174
    depends_on:
      - metad0
      - metad1
      - metad2
    healthcheck:
      test: ["CMD", "curl", "-f", "http://192.168.4.174:13004/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    ports:
      - target: 3699
        published: 3641
        protocol: tcp
        mode: host
      - target: 13000
        published: 13004
        protocol: tcp
#        mode: host
      - target: 13002
        published: 13005
        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:

看你镜像是1.0的,1.0没有改过端口啊

我看咱们2.0官方文档中只有compose方式的配置方法,2.0版本有没有对应的swarm的配置文档呢?直接把1.0配置文件中的镜像名称改了可以吗?

直接改镜像名会出现如下问题:

# docker service ls
ID                  NAME                MODE                REPLICAS            IMAGE                               PORTS
s53625198wx6        nebula_graphd0      replicated          0/1                 vesoft/nebula-graphd:v2-nightly     *:13000->13000/tcp
zx2mnuhgy6x4        nebula_graphd1      replicated          0/1                 vesoft/nebula-graphd:v2-nightly     *:13003->13002/tcp
swy7kvj0dh8r        nebula_graphd2      replicated          0/1                 vesoft/nebula-graphd:v2-nightly     *:13004->13000/tcp
0iwbznm4rmul        nebula_metad0       replicated          0/1                 vesoft/nebula-metad:v2-nightly
e1zo6ye3l4ot        nebula_metad1       replicated          0/1                 vesoft/nebula-metad:v2-nightly
3are17ty5mz9        nebula_metad2       replicated          0/1                 vesoft/nebula-metad:v2-nightly
9qakjbr2xckg        nebula_storaged0    replicated          0/1                 vesoft/nebula-storaged:v2-nightly
m7odkxnrjoxs        nebula_storaged1    replicated          0/1                 vesoft/nebula-storaged:v2-nightly
gxk34dus62bg        nebula_storaged2    replicated          0/1                 vesoft/nebula-storaged:v2-nightly
# docker service ps 0iwbznm4rmul
ID                  NAME                IMAGE                            NODE                  DESIRED STATE       CURRENT STATE                 ERROR               PORTS
db0sr12qibbw        nebula_metad0.1     vesoft/nebula-metad:v2-nightly   test001   Shutdown            Complete about a minute ago

docker service ps xxx --no-trunc 看下

[root@bigbro ~]# docker service ls
ID                  NAME                MODE                REPLICAS            IMAGE                               PORTS
prnv0fikzra7        nebula_graphd0      replicated          0/1                 vesoft/nebula-graphd:v2-nightly     *:13000->13000/tcp
u57yg327k7l5        nebula_graphd1      replicated          0/1                 vesoft/nebula-graphd:v2-nightly     *:13003->13002/tcp
irifbulyagxg        nebula_graphd2      replicated          0/1                 vesoft/nebula-graphd:v2-nightly     *:13004->13000/tcp
d8h7hdgez4n5        nebula_metad0       replicated          0/1                 vesoft/nebula-metad:v2-nightly
ieuhq0dmsukg        nebula_metad1       replicated          0/1                 vesoft/nebula-metad:v2-nightly
oo1261iqj5zu        nebula_metad2       replicated          0/1                 vesoft/nebula-metad:v2-nightly
loiq5n9hg1jc        nebula_storaged0    replicated          0/1                 vesoft/nebula-storaged:v2-nightly
2270jbvu2y1c        nebula_storaged1    replicated          0/1                 vesoft/nebula-storaged:v2-nightly
j6x39kz19bny        nebula_storaged2    replicated          0/1                 vesoft/nebula-storaged:v2-nightly

这是mate节点的

[root@bigbro ~]# docker service ps d8h7hdgez4n5 --no-trunc
ID                          NAME                IMAGE                                                                                                    NODE                  DESIRED STATE       CURRENT STATE             ERROR               PORTS
szwn25afye9l4a1mwftcnkl1d   nebula_metad0.1     vesoft/nebula-metad:v2-nightly@sha256:457f6e1e5a5f79d7e3d71b63ff9ced9b11be4c500c6886d384dbe9af205088af   bigbro.zeng.test001   Shutdown            Complete 52 seconds ago

这是graph节点的:

[root@bigbro ~]# docker service ps prnv0fikzra7 --no-trunc
ID                          NAME                   IMAGE                                                                                                     NODE                  DESIRED STATE       CURRENT STATE             ERROR                                                                               PORTS
mqzaqgnyn0dc5y9gdk1xxstg7   nebula_graphd0.1       vesoft/nebula-graphd:v2-nightly@sha256:3567417099be3bf8ea14fb2174ea0edfff4444a2bd72c93604ed133b2affc122   bigbro.zeng.test001   Ready               Rejected 3 seconds ago    "container cannot be disconnected from host network or connected to host network"
mipmd8e0i879lo1oyeu8n4861    \_ nebula_graphd0.1   vesoft/nebula-graphd:v2-nightly@sha256:3567417099be3bf8ea14fb2174ea0edfff4444a2bd72c93604ed133b2affc122   bigbro.zeng.test001   Shutdown            Rejected 8 seconds ago    "container cannot be disconnected from host network or connected to host network"
8bwsjebyncnqxqi8n5ej7hf5s    \_ nebula_graphd0.1   vesoft/nebula-graphd:v2-nightly@sha256:3567417099be3bf8ea14fb2174ea0edfff4444a2bd72c93604ed133b2affc122   bigbro.zeng.test001   Shutdown            Rejected 13 seconds ago   "container cannot be disconnected from host network or connected to host network"
069tssnjuu5xj49iyz5t3urlo    \_ nebula_graphd0.1   vesoft/nebula-graphd:v2-nightly@sha256:3567417099be3bf8ea14fb2174ea0edfff4444a2bd72c93604ed133b2affc122   bigbro.zeng.test001   Shutdown            Rejected 18 seconds ago   "container cannot be disconnected from host network or connected to host network"
o10ox6j3cs6fd9oa6jedv6opj    \_ nebula_graphd0.1   vesoft/nebula-graphd:v2-nightly@sha256:3567417099be3bf8ea14fb2174ea0edfff4444a2bd72c93604ed133b2affc122   bigbro.zeng.test001   Shutdown            Rejected 23 seconds ago   "container cannot be disconnected from host network or connected to host network"

确认一下 docker 在每个 node 上是否都已经 login,docker hub 后期有修改 pull 的策略,如果是匿名用户会限制拉取 image 的频率,但是登陆用户就没有这个限制。