Nebula 2.0.1 部署后使用importer 导入palyer, follow的csv报错

大家好,咨询一个问题:
我用官方的player,team 的样例数据导入到刚部署的单机版Nebula服务中,服务是2.0.1版本,执行语句如下:

./nebula-importer --config  /data/nebula-datas/player.yml
报错如下:
2021/08/19 20:38:02 --- START OF NEBULA IMPORTER ---
2021/08/19 20:38:02 [INFO] connection_pool.go:74: [nebula-clients] connection pool is initialized successfully
2021/08/19 20:38:02 [INFO] clientmgr.go:28: Create 1 Nebula Graph clients
2021/08/19 20:38:02 [INFO] reader.go:64: Start to read file(0): /data/nebula-datas/vertex_team.csv, schema: < :VID(string),team.name:string >
panic: send on closed channel

goroutine 20 [running]:
github.com/vesoft-inc/nebula-importer/pkg/reader.(*Batch).requestClient(0xc0000b0040)
        /data/softs/nebula-importer/pkg/reader/batch.go:66 +0x15c
github.com/vesoft-inc/nebula-importer/pkg/reader.(*Batch).Add(0xc0000b0040, 0x1, 0xc00000efe0, 0x2, 0x2)
        /data/softs/nebula-importer/pkg/reader/batch.go:36 +0xa5
github.com/vesoft-inc/nebula-importer/pkg/reader.(*FileReader).Read(0xc0000b0000, 0x0, 0x0)
        /data/softs/nebula-importer/pkg/reader/reader.go:162 +0x58c
github.com/vesoft-inc/nebula-importer/pkg/cmd.(*Runner).Run.func2(0xc00005ab40, 0xc00005ab80, 0xc0000b0000, 0xc00001a1b0, 0x22)
        /data/softs/nebula-importer/pkg/cmd/runner.go:70 +0x45
created by github.com/vesoft-inc/nebula-importer/pkg/cmd.(*Runner).Run
        /data/softs/nebula-importer/pkg/cmd/runner.go:69 +0x6bc
[root@ecs-5368-0007 nebula-importer]# 

我的player.yaml 如下:

version: v2
description: player-import-test
removeTempFiles: false
clientSettings:
  retry: 3
  concurrency: 1 # number of graph clients
  channelBufferSize: 1
  space: player
  connection:
    user: user
    password: password
    address: 119.3.216.97:9669
  postStart:
    commands: |
      UPDATE CONFIGS storage:wal_ttl=3600;
      UPDATE CONFIGS storage:rocksdb_column_family_options = { disable_auto_compactions = true };
      DROP SPACE IF EXISTS player;
      CREATE SPACE IF NOT EXISTS player(partition_num=5, replica_factor=1, vid_type=FIXED_STRING(10));
      USE player;
      CREATE TAG player(name string, age int);
      CREATE TAG team(name string);
      CREATE EDGE follow(degree int);
      CREATE EDGE serve(start_year int, end_year int);
    afterPeriod: 8s
  preStop:
    commands: |
      UPDATE CONFIGS storage:rocksdb_column_family_options = { disable_auto_compactions = false };
      UPDATE CONFIGS storage:wal_ttl=86400;
logPath: /data/nebula-datas/err/test.log
files:
  - path: /data/nebula-datas/vertex_team.csv
    failDataPath: /data/nebula-datas/err/vertex_team.csv
    batchSize: 2
    type: csv
    csv:
      withHeader: false
      withLabel: false
    schema:
      type: vertex
      vertex:
        tags:
          - name: team
            props:
              - name: name
                type: string
  - path: /data/nebula-datas/vertex_player.csv
    failDataPath: /data/nebula-datas/err/vertex_player.csv
    batchSize: 2
    inOrder: false
    type: csv
    csv:
      withHeader: false
      withLabel: false
    schema:
      type: vertex
      vertex:
        tags:
          - name: player
            props:
              - name: name
                type: string
              - name: 
                type: string

  - path: /data/nebula-datas/edge_follow.csv
    failDataPath: /data/nebula-datas/err/edge_follow.csv
    batchSize: 2
    inOrder: false
    type: csv
    csv:
      withHeader: false
      withLabel: false
    schema:
      type: edge
      edge:
        name: follow
        withRanking: false
        props:
          - name: degree
            type: int

  - path: /data/nebula-datas/edge_serve.csv
    failDataPath: /data/nebula-datas/err/edge_serve.csv
    batchSize: 2
    type: csv
    csv:
      withHeader: false
      withLabel: false
    schema:
     type: edge
     edge:
        name: serve;
        withRanking: false
        props:
          - name: start_year
            type: int
          - name: end_year
            type: int

样例数据格式如下:

样例数据格式如下:
edge_follow.csv:
player100,player101,95
player100,player125,95
player101,player100,95
player101,player102,90
edge_serve.csv:
player100,team204,1997,2016
player101,team204,1999,2018
vertex_player.csv:
player105,31,Danny Green
player109,34,Tiago Splitter
vertex_player.csv:
team204,Spurs
team218,Raptors

求教这到底是哪里配置的问题,看到这个panic: send on closed channel
字面意思是发送到关闭的连接上,具体什么意思?

SHOW HOSTS 下,看服务的状态如何

执行了,返回如下:

(root@nebula) [(none)]> show hosts;
+-----------------+------+----------+--------------+-----------------------------+-----------------------------+
| Host            | Port | Status   | Leader count | Leader distribution         | Partition distribution      |
+-----------------+------+----------+--------------+-----------------------------+-----------------------------+
| "192.168.1.52"  | 9779 | "ONLINE" | 2            | "importer_test:1, player:1" | "importer_test:1, player:1" |
+-----------------+------+----------+--------------+-----------------------------+-----------------------------+
| "192.168.1.118" | 9779 | "ONLINE" | 4            | "importer_test:2, player:2" | "importer_test:2, player:2" |
+-----------------+------+----------+--------------+-----------------------------+-----------------------------+
| "192.168.1.121" | 9779 | "ONLINE" | 4            | "importer_test:2, player:2" | "importer_test:2, player:2" |
+-----------------+------+----------+--------------+-----------------------------+-----------------------------+
| "Total"         |      |          | 10           | "importer_test:5, player:5" | "importer_test:5, player:5" |
+-----------------+------+----------+--------------+-----------------------------+-----------------------------+
Got 4 rows (time spent 574/836 us)

Fri, 20 Aug 2021 13:34:48 CST

你这个端口号和起来的服务的端口号不是对应的呀。:thinking: 你改成你正在使用的服务的 IP 呢?

SHOW HOSTS GRAPH

看下 graphd 的端口号地址

是这样的,119.3.216.97 这个是公网ip,对应我们内网ip 是上面其中的一个

你好,大佬,执行如下

(root@nebula) [basketballplayer]> SHOW HOSTS GRAPH
+-----------------+------+----------+---------+--------------+-------------------------------------------+
| Host            | Port | Status   | Role    | Git Info Sha | Version                                   |
+-----------------+------+----------+---------+--------------+-------------------------------------------+
| "192.168.1.52"  | 9669 | "ONLINE" | "GRAPH" | "c397299c"   | "2.5.0, Build Time: Aug 19 2021 11:26:05" |
+-----------------+------+----------+---------+--------------+-------------------------------------------+
| "192.168.1.118" | 9669 | "ONLINE" | "GRAPH" | "c397299c"   | "2.5.0, Build Time: Aug 19 2021 11:20:18" |
+-----------------+------+----------+---------+--------------+-------------------------------------------+
| "192.168.1.121" | 9669 | "ONLINE" | "GRAPH" | "c397299c"   | "2.5.0, Build Time: Aug 19 2021 11:20:18" |
+-----------------+------+----------+---------+--------------+-------------------------------------------+

你在importer所在机器能用nebula-console连接上119.3.216.97:9669这个服务并且成功insert数据吗?

我就是登录的97这台服务器操作的,你说的Insert 是杂操作,我是建好space,schema 后使用console --config xxx.yaml 执行的,你说的类似于sql的直接插入语句么我没看到? 上午没解决掉,我就使用importer 目录下examples 中的example.yaml 同样的配置用户名,密码,服务器ip,端口,这个是可以执行成功的,他们都在97上操作的,也就是本机执行的

浙ICP备20010487号