nebula集群3.0.1升级到3.3.0后服务启动失败

  • nebula 版本:3.0.1
    -Studio版本:3.2.3
    -部署方式:分布式(三台metad,四台graphd,四台storaged)
    -安装方式:DEB
    -是否为线上版本:N
    -硬件信息
    -磁盘 SSD
    -CPU、内存信息 单节点 8core16g
    问题的具体描述:

集群数据从centos8迁移到debian10,使用的方法为利用 snapshot 进行集群迁移,连接为:https://www.nebula-graph.com.cn/posts/use-snapshot-to-migrate-cluster,迁移后,服务都正常,也可以查询
将所有服务关闭并升级到3.3.0后,graphd一直无法启动,升级方式为:升级 v3.0.x 至当前版本 - NebulaGraph Database 手册
graphd报错:

E20230105 20:09:35.214042 25640 MetaClient.cpp:285] Get parts allocation failed for spaceId 1883264513, status Key not existed!
I20230105 20:09:35.214280 25640 MetaClient.cpp:133] Waiting for the metad to be ready!
E20230105 20:09:45.217346 25640 MetaClient.cpp:285] Get parts allocation failed for spaceId 1883269889, status Key not existed!
I20230105 20:09:45.217386 25640 MetaClient.cpp:133] Waiting for the metad to be ready!
E20230105 20:09:55.221002 25640 MetaClient.cpp:285] Get parts allocation failed for spaceId 1883275265, status Key not existed!
I20230105 20:09:55.221043 25640 MetaClient.cpp:133] Waiting for the metad to be ready!
E20230105 20:10:05.224366 25640 MetaClient.cpp:285] Get parts allocation failed for spaceId 1883280129, status Key not existed!
I20230105 20:10:05.224514 25640 MetaClient.cpp:144] Register time task for heartbeat!
E20230105 20:10:05.224527 25640 GraphService.cpp:51] Failed to wait for meta service ready synchronously.
E20230105 20:10:05.224542 25640 GraphServer.cpp:39] Failed to wait for meta service ready synchronously.
E20230105 20:10:05.226395 25640 GraphDaemon.cpp:163] The graph server start failed

可以贴一下 meta 和 storage 的日志么。

我把其中一台服务器的日志先贴过来,如果还需要其他日志,我再贴
nebula-graphd.INFO (2.4 KB)
nebula-metad.INFO (3.4 KB)
nebula-storaged.INFO (3.5 KB)

贴一下另外两个 metad 的日志把

好的
nebula-metad (2).INFO (1.1 MB)
nebula-metad (3).INFO (2.7 KB)

怀疑 space id 有点问题;集群之前保存过 space id 吗,能把集群中所有 space id 贴一下吗?可以通过两种办法看:

  1. 如果有以前的集群,可以通过在 nebula console 中 show spaces 然后 describe space xxx 来看;
  2. 可以在 storaged 机器上,在 ${nebula-install}/data/storage/nebula 文件夹 list 一下。
1 个赞

目前除了0以外,有五个id,分别为1,2,3,4,17,因为之前用的 snapshot 进行集群迁移,所以比较熟悉

那感觉 metad 数据有点问题,可以在 metad 安装目录 bin 下找到一个 meta_dump 的二进制文件,然后执行:

./meta_dump --path=${nebula-install}/data/meta/nebula/0/data

其中 ${nebula-install} 要替换为你的 metad 安装目录,注意在 10.100.100.132 上执行,这个应该是 metad 的 leader。然后将结果在这里贴一下

meta_dump.txt (41.6 KB)

meta 确实有些问题;把这个目录: ${nebula-install}/data/meta/nebula/0/data 打一个 zip 包发上来吗?我们定位下原因,然后可以帮你修下。

1 个赞

我重新执行了一下我之前的步骤,这里是新的meta_dump和meta下的数据
meta.zip (1.3 MB)
meta_dump1.txt (55.1 KB)

1 个赞

感谢,该问题确实是一个 bug 引起的,我们在 3.1 以后的版本修复了,pr 在这里:https://github.com/vesoft-inc/nebula/pull/4182
另外,这是你的 meta,我手动帮你修复了下,替换原来的 meta 应该就可以用了。
meta.zip (1.3 MB)

3 个赞

好的,我看看

这个日志是测试环境的,如果正式环境我们要从3.0.1到3.3.0会不会有相同的问题,是不是也需要改

可以先通过 meta_dump 看一下数据格式是否损坏,每个 space 如果有两条信息就是错的,比如:

I20230109 14:01:01.865007   540 MetaDumpTool.cpp:83] space id: 2, space name: facebook, partition num: 10, replica_factor: 1
I20230109 14:01:01.865018   540 MetaDumpTool.cpp:83] space id: 2, space name: facebook, partition num: 10, replica_factor: 1

这个 bug 是由于 drop host 引起的,如果你线上环境没有 drop 过 host,应该不会有有这个问题。

好的,等测试稳定后,我试试线上升级