搭建好Nebula Graph集群之后,开始导入数据,提示Failed to open connection, error: Failed to open transport

  • nebula 版本:(为节省回复者核对版本信息的时间,首次发帖的版本信息记得以截图形式展示)
  • 部署方式:分布式
  • 安装方式:RPM
  • 是否为线上版本:N
  • 硬件信息
    • 磁盘( 推荐使用 SSD)
    • CPU、内存信息:3台32G的Untuntu机器
  • 问题的具体描述
    问题1. 将数据导入到Nebula Graph中,配置文件中是clientSettings里面的address是要配置所有IP
    问题2. 搭建好Nebula Graph集群之后开始导入数据,出现Failed to open connection,但是登陆到Nebula Grpah是没有问题的

配置文件,多个IP也测试过

version: v1rc1
description: example
clientSettings:
  concurrency: 10 # number of graph clients
  channelBufferSize: 128
  space: test
  connection:
    user: root
    password: nebula
    address: 192.168.5.91:9699

开始导入数据

2021/11/23 09:14:12 --- START OF NEBULA IMPORTER ---
2021/11/23 09:14:12 [WARN] config.go:217: Invalid retry option in clientSettings.retry, reset to 1
2021/11/23 09:14:12 [WARN] config.go:168: You have not configured whether to remove generated temporary files, reset to default value. removeTempFiles: false
2021/11/23 09:14:13 Failed to open connection, error: Failed to open transport, error: dial tcp 10.141.5.91:9699: connect: connection refused
2021/11/23 09:14:14 --- END OF NEBULA IMPORTER ---

正常连接Nebula Graph服务

2021/11/23 17:23:49 [INFO] connection pool is initialized successfully

Welcome to Nebula Graph!

(root@nebula) [(none)]> show hosts
+----------------+------+----------+--------------+---------------------+------------------------+
| Host           | Port | Status   | Leader count | Leader distribution | Partition distribution |
+----------------+------+----------+--------------+---------------------+------------------------+
| "192.168.5.88"  | 9779 | "ONLINE" | 33           | "test"        | "test:33"           |
| "192.192.5.91"  | 9779 | "ONLINE" | 34           | "test:34"        | "test:34"           |
| "192.168.5.113" | 9779 | "ONLINE" | 33           | "test:33"        | "test:33"           |
| "Total"        |      |          | 100          | "test:100"       | "test:100"          |
+----------------+------+----------+--------------+---------------------+------------------------+
Got 4 rows (time spent 2108/3434 us)

Tue, 23 Nov 2021 17:23:54 CST

版本问题吧,Nebula和Importer分别什么版本

Nebula Graph:2.5
Nebula Importer: vesoft/nebula-importer:v2
版本没问题吧

Unable to find image 'vesoft/nebula-importer:v2' locally
v2: Pulling from vesoft/nebula-importer
ba3557a56b15: Pull complete
25c5e592e1ac: Pull complete
Digest: sha256:aa26c1971fb4e9a53fb35a3b4b3172590f70db15f9ec6d2a16dcf28798dca430
Status: Downloaded newer image for vesoft/nebula-importer:v2
2021/11/23 12:51:43 --- START OF NEBULA IMPORTER ---
2021/11/23 12:51:43 [WARN] config.go:217: Invalid retry option in clientSettings.retry, reset to 1
2021/11/23 12:51:43 [WARN] config.go:168: You have not configured whether to remove generated temporary files, reset to default value. removeTempFiles: false
2021/11/23 12:51:43 Failed to open connection, error: Failed to open transport, error: dial tcp 10.141.5.88:9699: connect: no route to host
2021/11/23 12:51:44 --- END OF NEBULA IMPORTER ---

和集群部署方案有关系吗

机器  IP地址                    Graph   storaged    Metad
A	192.168.10.111	1	     1	                1
B	192.168.10.112	1	     1	                1
C	192.168.10.113	1	     1	                1

还有就是通过Nebula Grpah Studio只能通过一台登陆登陆,其他两台都显示

配置失败: failed to open transport, error: dial tcp IP:9669: connect: no route to host

你的配置贴一下,报错信息好像是说服务连接有问题,你看看几个服务用的端口是不是被占用了

但是通过Nebula-console三台机器都可以正常登陆

三台机器服务状态都是ok的

➜  nebula-console git:(master) ✗ sudo /usr/local/nebula/scripts/nebula.service status all
[sudo] password for jianan:
[INFO] nebula-metad(5b83e5cb): Running as 20051, Listening on 9559
[INFO] nebula-graphd(ca585878): Running as 20116, Listening on 9669
[INFO] nebula-storaged(5b83e5cb): Running as 20133, Listening on 9779

配置文件? 我就是填了真实IP,

########## networking ##########
# Comma separated Meta Server Addresses
--meta_server_addrs=192.168.5.88:9559,192.168.5.91:9559,192.168.5.113:9559
# Local IP used to identify the nebula-graphd process.
# Change it to an address other than loopback if the service is distributed or
# will be accessed remotely.
--local_ip=192.168.5.88

看起来是端口不通,可以从调用importer的ip telnet 或者wget一下目标ip:port,看一下是否通畅,或者直接关闭掉防火墙试一下

studio 链接 nebula core 本质上不是从浏览器,而是通过 studio 自己的后端中转的,所以需要保证 studio 运行的机器上可以访问到 graphD 的 ip:port

您这里填的是 9699 这不是 graphD 默认的端口,请确认一下哈。

端口是我填错了,但是改为9699,还是一样的问题,还是显示集群的88机器Failed to open transport, error: dial tcp 10.141.5.91:9669: connect: connection refused

  1. 确保 graphD 所在的机器上是监听在 10.141.5.91:9669
    可以在 graphD 机器上执行 ss -plunt | grep 9669
  2. 确保机器上 10.141.5.91:9669 是允许 importer 的进来的网络的(没有防火墙/ security group 阻止)

此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。