常见问题 FAQ(frequently asked questions)

Trouble Shooting

Trouble Shooting 部分列出了 Nebula Graph 操作中的常见错误。

storaged 服务无法正常启动

同一台主机先后用于单机测试和集群测试,storaged 服务无法正常启动(终端上显示的 storaged 服务的监听端口是红色的)。查看 storged 服务的日志(/usr/local/nebula/nebula-storaged.ERROR),若发现 “wrong cluster” 的报错信息,则可能的出错原因是单机测试和集群测试时的 Nebula Graph 生成的 cluster id 不一致,需要删除 Nebula Graph 安装目录(/usr/local/nebula)下的 cluster.id 文件和 data 目录后,重启服务。

Connection Refused

E1121 04:49:34.563858   256 GraphClient.cpp:54] Thrift rpc call failed: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused

检查服务是否存在

$ /usr/local/nebula/scripts/nebula.service status all

进程异常 crash

  1. 检查硬盘空间 df -h
  2. 检查内存是否足够 free -h

未找到日志和更改日志级别

日志文件默认在 /usr/local/nebula/logs/ 下。

配置文件

配置文件默认在 /usr/local/nebula/etc/ 下。

运行时参数

在 Nebula console 中运行

nebula> SHOW CONFIGS;

Could not create logging file:... Too many open files

  1. 检查硬盘空间 df -h
  2. 检查日志目录 /usr/local/nebula/logs/
  3. 修改允许打开的最大文件数 ulimit -n 65536

如何查看 Nebula Graph 版本信息

使用 curl http://ip:port/status 命令获取 git_info_sha、binary 包的 commitID。

General Information

General Information 部分列出了关于 Nebula Graph 的概念性问题。

查询返回时间解释

nebula> GO FROM 101 OVER follow
===============
| follow._dst |
===============
| 100         |
---------------
| 102         |
---------------
| 125         |
---------------
Got 3 rows (Time spent: 7431/10406 us)

以上述查询为例,Time spent 中前一个数字 7431 为数据库本身所花费的时间,即 query engine 从 console 收到这条查询语句,到存储拿到数据,并进行一系列计算所花的时间;后一个数字 10406 是从客户端角度看花费的时间,即 console 从发送请求,到收到响应,并将结果输出到屏幕的时间。

其他问题可以参考这里:

https://docs.nebula-graph.com.cn/manual-CN/1.overview/2.quick-start/2.FAQ/

1 个赞