Star

v2 python 插入数据时storage failed

  • nebula 版本:v2-nightly
  • 部署方式(分布式 / 单机 / Docker / DBaaS):分布式
  • 使用python接口插入数据时出现问题
  • 问题的具体描述

我在使用python接口撰写一个数据导入的接口。

  1. 首先分别编写了CREAT SPACE、TAG和EDGE的方法,以及数据导入的方法,分别运行没有问题。
  2. 但是当合并运行时(CREAT SPACE、TAG和EDGE之后直接运行数据导入方法),出现错误如下:
AssertionError: Request to storage failed, without failedCodes.
  1. 然后我尝试了在CREAT SPACE、TAG和EDGE之后等待20-100s,再运行数据导入的方法,无效,仍然报上面的错。
  2. 短时间内分别运行二者也会报同样的错。

请大佬们帮忙看看如何解决该问题?

你创建的space是几副本的呢?

CREATE SPACE stock(partition_num=15, replica_factor=3, vid_type=fixed_string(40));

使用的就是教程里推荐的Create语句,3副本的

更新:等待150s,仍然不行,输出如下:

(py3) lyc@kdhy-X299-WU8:~/nebula-example/stock-demo$ python demo_stack_create.py
[2021-01-05 15:28:34,430]:Get connection to ('192.168.4.172', 3699)
[2021-01-05 15:28:34,432]:Space creating
100%|██████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:06<00:00,  1.00s/it]
[2021-01-05 15:28:40,461]:stock SPACE create success!
+---------------+-----------+-----------+--------------+---------------------+------------------------+
|      Host     |    Port   |   Status  | Leader count | Leader distribution | Partition distribution |
+---------------+-----------+-----------+--------------+---------------------+------------------------+
| 192.168.4.172 |   44500   |   ONLINE  |      1       |       stock:1       |        stock:15        |
| 192.168.4.173 |   44500   |   ONLINE  |      0       |  No valid partition |        stock:15        |
| 192.168.4.174 |   44500   |   ONLINE  |      14      |       stock:14      |        stock:15        |
|     Total     | __EMPTY__ | __EMPTY__ |      15      |       stock:15      |        stock:45        |
+---------------+-----------+-----------+--------------+---------------------+------------------------+
[2021-01-05 15:28:41,478]:person TAG create success!
[2021-01-05 15:28:41,488]:company TAG create success!
[2021-01-05 15:28:41,497]:concept TAG create success!
[2021-01-05 15:28:41,507]:industry TAG create success!
+----------+
|   Name   |
+----------+
| company  |
| concept  |
| industry |
|  person  |
+----------+
[2021-01-05 15:28:41,524]:employ_of EDGE create success!
[2021-01-05 15:28:41,537]:concept_of EDGE create success!
[2021-01-05 15:28:41,549]:industry_of EDGE create success!
+-------------+
|     Name    |
+-------------+
|  concept_of |
|  employ_of  |
| industry_of |
+-------------+
[2021-01-05 15:28:41,552]:Structure create finish. You need to wait 150s, Preparing......
100%|██████████████████████████████████████████████████████████████████████████████████████| 150/150 [02:30<00:00,  1.00s/it]
[2021-01-05 15:31:11,768]:person NODEs
[2021-01-05 15:31:12,553]:10000 NODEs created.
[2021-01-05 15:31:13,263]:20000 NODEs created.
Traceback (most recent call last):
  File "/home/lyc/nebula-example/stock-demo/NebulaDB.py", line 29, in wrapper
    re = func(self, *args, **kwargs)
  File "/home/lyc/nebula-example/stock-demo/NebulaDB.py", line 199, in insert_node
    assert resp.is_succeeded(), resp.error_msg()
AssertionError: Request to storage failed, without failedCodes.

storage0 错误日志如下:
(docker service ls 没问题,但是看起来好像storage0没起来)

Log file created at: 2021/01/04 09:29:24
Running on machine: node172
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
E0104 09:29:24.428337    47 MetaClient.cpp:581] Send request to [192.168.4.173:45500], exceed retry limit
E0104 09:29:24.428948     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0104 09:29:29.438411    48 MetaClient.cpp:581] Send request to [192.168.4.174:45500], exceed retry limit
E0104 09:29:29.438558     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0104 09:29:34.448210    49 MetaClient.cpp:581] Send request to [192.168.4.174:45500], exceed retry limit
E0104 09:29:34.448376     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0104 09:29:39.457787    50 MetaClient.cpp:581] Send request to [192.168.4.174:45500], exceed retry limit
E0104 09:29:39.457934     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0104 09:29:44.465252    51 MetaClient.cpp:581] Send request to [192.168.4.173:45500], exceed retry limit
E0104 09:29:44.465409     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0104 09:29:49.472434    52 MetaClient.cpp:581] Send request to [192.168.4.174:45500], exceed retry limit
E0104 09:29:49.472638     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0104 09:29:54.479324    53 MetaClient.cpp:581] Send request to [192.168.4.174:45500], exceed retry limit
E0104 09:29:54.479523     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0104 09:29:59.487864    54 MetaClient.cpp:581] Send request to [192.168.4.173:45500], exceed retry limit
E0104 09:29:59.488070     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0104 09:30:04.496644    55 MetaClient.cpp:581] Send request to [192.168.4.173:45500], exceed retry limit
E0104 09:30:04.497037     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0104 09:30:09.504637    56 MetaClient.cpp:581] Send request to [192.168.4.173:45500], exceed retry limit
E0104 09:30:09.504928     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0104 09:30:14.512796    57 MetaClient.cpp:581] Send request to [192.168.4.172:45500], exceed retry limit
E0104 09:30:14.513116     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0104 09:30:19.519568    58 MetaClient.cpp:581] Send request to [192.168.4.173:45500], exceed retry limit
E0104 09:30:19.519862     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0104 09:30:24.556054     1 FileUtils.cpp:384] Failed to read the directory "/data/storage/nebula" (2): No such file or directory
E0104 09:30:31.016501    76 MetaClient.cpp:121] Heartbeat failed, status:LeaderChanged: Leader changed!
E0104 09:31:44.382529    79 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 10] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:44.409669    80 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 8] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:44.428336    79 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 4] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:44.435554    78 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 7] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:44.589519    80 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 6] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:44.615517    80 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 13] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:45.838585    79 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 14] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:45.841459    79 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 12] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:45.860471    77 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 2] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:45.896450    80 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 3] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:45.906093    78 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 5] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:46.862314    77 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 1] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:46.865346    77 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 10] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:46.898083    80 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 7] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:46.907241    78 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 8] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:47.262377    79 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 4] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:47.867537    77 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 9] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:47.908761    78 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 11] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:48.264102    79 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 14] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:48.305642    80 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 12] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:48.870007    77 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 6] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0104 09:31:48.871958    77 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 2] Receive response about askForVote from [192.168.4.173:44501], error code is -6

启动nebula的yml文件如下:

version: '3.6'
services:
  metad0:
    container_name: nebula-mate0
    image: vesoft/nebula-metad:v2-nightly
    env_file:
      - /home/gdelt/nebula/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
      - --ws_http_port=11000
      - --data_path=/data/meta
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    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:
      - /home/gdelt/nebula/data/meta0:/data/meta
      - /home/gdelt/nebula/logs/meta0:/logs
    networks:
      - nebula-net

  metad1:
    container_name: nebula-mate1
    image: vesoft/nebula-metad:v2-nightly
    env_file:
      - /home/gdelt/nebula/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
      - --ws_http_port=11000
      - --data_path=/data/meta
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    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:
      - /home/gdelt/nebula/data/meta1:/data/meta
      - /home/gdelt/nebula/logs/meta1:/logs
    networks:
      - nebula-net

  metad2:
    container_name: nebula-mate2
    image: vesoft/nebula-metad:v2-nightly
    env_file:
      - /home/gdelt/nebula/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
      - --ws_http_port=11000
      - --data_path=/data/meta
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    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:
      - /home/gdelt/nebula/data/meta2:/data/meta
      - /home/gdelt/nebula/logs/meta2:/logs
    networks:
      - nebula-net

  storaged0:
    container_name: nebula-storaged0
    image: vesoft/nebula-storaged:v2-nightly
    env_file:
      - /home/gdelt/nebula/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
      - --ws_http_port=12000
      - --data_path=/data/storage
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    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:
      - /home/gdelt/nebula/data/storaged0:/data/meta
      - /home/gdelt/nebula/logs/storaged0:/logs
    networks:
      - nebula-net

  storaged1:
    container_name: nebula-storaged1
    image: vesoft/nebula-storaged:v2-nightly
    env_file:
      - /home/gdelt/nebula/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
      - --ws_http_port=12000
      - --data_path=/data/storage
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    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:
      - /home/gdelt/nebula/data/storaged1:/data/meta
      - /home/gdelt/nebula/logs/storaged1:/logs
    networks:
      - nebula-net

  storaged2:
    container_name: nebula-storaged2
    image: vesoft/nebula-storaged:v2-nightly
    env_file:
      - /home/gdelt/nebula/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
      - --ws_http_port=12000
      - --data_path=/data/storage
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    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:
      - /home/gdelt/nebula/data/storaged2:/data/meta
      - /home/gdelt/nebula/logs/storaged2:/logs
    networks:
      - nebula-net

  graphd0:
    container_name: nebula-graphd0
    image: vesoft/nebula-graphd:v2-nightly
    env_file:
      - /home/gdelt/nebula/nebula.env
    command:
      - --meta_server_addrs=192.168.4.172:45500,192.168.4.173:45500,192.168.4.174:45500
      - --port=3699
      - --ws_http_port=13000
      - --ws_ip=192.168.4.172
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    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:
      - /home/gdelt/nebula/logs/graphd0:/logs
      - /home/gdelt/nebula/config:/usr/local/nebula/etc
    networks:
      - nebula-net

  graphd1:
    container_name: nebula-graphd1
    image: vesoft/nebula-graphd:v2-nightly
    env_file:
      - /home/gdelt/nebula/nebula.env
    command:
      - --meta_server_addrs=192.168.4.172:45500,192.168.4.173:45500,192.168.4.174:45500
      - --port=3699
      - --ws_http_port=13000
      - --ws_ip=192.168.4.173
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    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: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:
      - /home/gdelt/nebula/logs/graphd1:/logs
      - /home/gdelt/nebula/config:/usr/local/nebula/etc
    networks:
      - nebula-net

  graphd2:
    container_name: nebula-graphd2
    image: vesoft/nebula-graphd:v2-nightly
    env_file:
      - /home/gdelt/nebula/nebula.env
    command:
      - --meta_server_addrs=192.168.4.172:45500,192.168.4.173:45500,192.168.4.174:45500
      - --port=3699
      - --ws_http_port=13000
      - --ws_ip=192.168.4.174
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    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: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:
      - /home/gdelt/nebula/logs/graphd2:/logs
      - /home/gdelt/nebula/config:/usr/local/nebula/etc
    networks:
      - nebula-net

networks:
  nebula-net:
    external: true
    attachable: true
    name: host

看YML文件好像是storage路径映射出现问题,我改一下重启试试。

是的 storage的路径写成meta了。
重启之后服务正常了吗?

修正了storage的路径,但是出现了新的问题,节点三无法进行负载均衡。
storage2(节点174)日志如下:

Log file created at: 2021/01/05 10:18:11
Running on machine: node174
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
E0105 10:18:11.907562    47 MetaClient.cpp:581] Send request to [192.168.4.172:45500], exceed retry limit
E0105 10:18:11.908147     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0105 10:18:16.920635    48 MetaClient.cpp:581] Send request to [192.168.4.173:45500], exceed retry limit
E0105 10:18:16.920774     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0105 10:18:21.930452    49 MetaClient.cpp:581] Send request to [192.168.4.173:45500], exceed retry limit
E0105 10:18:21.930596     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0105 10:18:26.939930    50 MetaClient.cpp:581] Send request to [192.168.4.173:45500], exceed retry limit
E0105 10:18:26.940073     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0105 10:18:31.947383    51 MetaClient.cpp:581] Send request to [192.168.4.174:45500], exceed retry limit
E0105 10:18:31.947558     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0105 10:18:36.953166    52 MetaClient.cpp:581] Send request to [192.168.4.172:45500], exceed retry limit
E0105 10:18:36.953209     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0105 10:18:41.959241    53 MetaClient.cpp:581] Send request to [192.168.4.174:45500], exceed retry limit
E0105 10:18:41.959386     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0105 10:18:46.966591    54 MetaClient.cpp:581] Send request to [192.168.4.173:45500], exceed retry limit
E0105 10:18:46.966815     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0105 10:18:51.973871    55 MetaClient.cpp:581] Send request to [192.168.4.173:45500], exceed retry limit
E0105 10:18:51.974232     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0105 10:18:56.981074    56 MetaClient.cpp:581] Send request to [192.168.4.172:45500], exceed retry limit
E0105 10:18:56.981233     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0105 10:19:01.988679    57 MetaClient.cpp:581] Send request to [192.168.4.172:45500], exceed retry limit
E0105 10:19:01.988848     1 MetaClient.cpp:60] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
E0105 10:19:04.036823     1 FileUtils.cpp:384] Failed to read the directory "/data/storage/nebula" (2): No such file or directory
E0105 10:19:14.540446    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 4] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:14.545289    72 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 10] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:14.709971    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 7] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:14.776453    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 5] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:14.833817    73 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 12] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:14.868283    72 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 1] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:14.894500    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 6] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:15.055819    71 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 3] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:15.194967    71 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 10] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:15.204264    71 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 11] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:15.334497    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 8] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:15.561573    71 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 1] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:15.583844    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 12] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:15.630020    73 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 9] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:15.705348    73 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 2] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:15.738442    73 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 3] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:15.787411    72 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 15] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:15.826735    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 4] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:15.863909    71 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 14] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:15.914476    73 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 5] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:15.952232    72 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 13] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:16.059249    72 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 6] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:16.128185    72 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 7] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:16.326520    71 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 11] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:16.341861    71 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 4] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:16.401929    73 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 1] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:16.421479    72 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 14] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:16.435278    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 10] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:16.791077    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 13] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:16.823143    73 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 3] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:16.962486    73 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 11] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.020681    72 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 7] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.051853    72 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 8] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.063586    71 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 9] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.138408    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 15] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.152243    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 12] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.166110    73 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 10] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.166332    72 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 2] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.352713    71 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 6] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.494266    72 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 11] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.529575    72 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 14] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.562041    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 13] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.670450    71 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 2] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.773774    73 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 5] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.810989    73 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 7] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.897228    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 10] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.921401    71 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 3] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.993551    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 4] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:17.994771    71 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 1] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:18.381151    73 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 11] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:18.385186    71 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 9] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:18.516472    73 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 5] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:18.580487    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 8] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:18.645769    72 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 6] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:18.717994    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 1] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:18.721875    73 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 12] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:18.780156    71 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 10] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:18.836540    70 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 14] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:18.862300    72 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 15] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:18.985179    73 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 4] Receive response about askForVote from [192.168.4.173:44501], error code is -6
E0105 10:19:19.017736    72 RaftPart.cpp:1143] [Port: 44501, Space: 1, Part: 2] Receive response about askForVote from [192.168.4.173:44501], error code is -6

console输出如下:

(graph1) lyc@kdhy-X299-WU8:~/nebula-example/nebula-v2.0$ ./nebula-console -addr 192.168.4.172 -port 3699 -u root -p nebula

Welcome to Nebula Graph v2.0.0-alpha!

(root@nebula) [(none)]> show hosts
+-----------------+-------+----------+--------------+----------------------+------------------------+
| Host            | Port  | Status   | Leader count | Leader distribution  | Partition distribution |
+-----------------+-------+----------+--------------+----------------------+------------------------+
| "192.168.4.172" | 44500 | "ONLINE" | 0            | "No valid partition" | "stock:15"             |
+-----------------+-------+----------+--------------+----------------------+------------------------+
| "192.168.4.173" | 44500 | "ONLINE" | 15           | "stock:15"           | "stock:15"             |
+-----------------+-------+----------+--------------+----------------------+------------------------+
| "192.168.4.174" | 44500 | "ONLINE" | 0            | "No valid partition" | "stock:15"             |
+-----------------+-------+----------+--------------+----------------------+------------------------+
| "Total"         |       |          | 15           | "stock:15"           | "stock:45"             |
+-----------------+-------+----------+--------------+----------------------+------------------------+
Got 4 rows (time spent 2310/3586 us)

Tue, 05 Jan 2021 18:21:18 CST

(root@nebula) [(none)]> balance leader
Execution succeeded (time spent 35181527/35181034 us)

Tue, 05 Jan 2021 18:21:58 CST

(root@nebula) [(none)]> show hosts
+-----------------+-------+----------+--------------+----------------------+------------------------+
| Host            | Port  | Status   | Leader count | Leader distribution  | Partition distribution |
+-----------------+-------+----------+--------------+----------------------+------------------------+
| "192.168.4.172" | 44500 | "ONLINE" | 7            | "stock:7"            | "stock:15"             |
+-----------------+-------+----------+--------------+----------------------+------------------------+
| "192.168.4.173" | 44500 | "ONLINE" | 8            | "stock:8"            | "stock:15"             |
+-----------------+-------+----------+--------------+----------------------+------------------------+
| "192.168.4.174" | 44500 | "ONLINE" | 0            | "No valid partition" | "stock:15"             |
+-----------------+-------+----------+--------------+----------------------+------------------------+
| "Total"         |       |          | 15           | "stock:15"           | "stock:45"             |
+-----------------+-------+----------+--------------+----------------------+------------------------+
Got 4 rows (time spent 1543/2545 us)

Tue, 05 Jan 2021 18:22:03 CST

反复删除logs和datas中的文件也无法解决。

日志中仍然报错:无法找到路径"/data/storage/nebula" ,yml文件中映射的路径为"/home/gdelt/nebula/data/storaged2:/data/storage", 其中"/home/gdelt/nebula/data/storaged2/nebula/"真实存在,也可以访问到,不知道为什么会出这个问题。

更新:找到了上一个问题,为node174的44501端口没开导致报错,已经开启端口44501,试一试结果如何。
结果:仍然存在文首storage的问题,但是经过sleep(20)操作之后不会报错

1赞

浙ICP备20010487号