修改配置后,运行 tiup cluster reload clusterxxx 出错

在修改了配置信息后,运行 tiup cluster reload clusterxxx 时,输出信息包含如下错误(恢复修改前的配置,同样运行 reload 命令得到相同的错误信息):
OS: Rocky Linux 9.6, x86-64
TiDB: v8.5.3

  • [ Serial ] - Upgrade Cluster
    Upgrading component tiflash
    Executing pre-upgrade command on 10.0.0.219

      Restarting instance 10.0.0.219:9000
      Restart instance 10.0.0.219:9000 success
      Executing post-upgrade command on 10.0.0.219
    

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xf770b1]

goroutine 1 [running]:
github.com/pingcap/tiup/pkg/cluster/operation.Upgrade({, }, {, }, {{0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, …}, …)
github.com/pingcap/tiup/pkg/cluster/operation/upgrade.go:202 +0x14b1
github.com/pingcap/tiup/pkg/cluster/manager.(*Manager).Reload.func2({0x154bb80?, 0xc0006156e0?})
github.com/pingcap/tiup/pkg/cluster/manager/reload.go:134 +0x90
github.com/pingcap/tiup/pkg/cluster/task.(*Func).Execute(0xc00034ff28?, {0x154bb80?, 0xc0006156e0?})
github.com/pingcap/tiup/pkg/cluster/task/func.go:34 +0x27
github.com/pingcap/tiup/pkg/cluster/task.(*Serial).Execute(0xc000a4b7e0, {0x154bb80, 0xc0006156e0})
github.com/pingcap/tiup/pkg/cluster/task/task.go:86 +0x21d
github.com/pingcap/tiup/pkg/cluster/manager.(*Manager).Reload(
, {
, _}, {{0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, 0x0, …}, …)
github.com/pingcap/tiup/pkg/cluster/manager/reload.go:145 +0xfaf
github.com/pingcap/tiup/components/cluster/command.newReloadCmd.func1(0xc00044d208?, {0xc00039f2c0, 0x4?, 0x135671a?})
github.com/pingcap/tiup/components/cluster/command/reload.go:40 +0xde
github.com/spf13/cobra.(*Command).execute(0xc00044d208, {0xc00039f280, 0x1, 0x1})
github.com/spf13/cobra@v1.6.1/command.go:916 +0x85c
github.com/spf13/cobra.(*Command).ExecuteC(0xc0001f8f08)
github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3a5
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.6.1/command.go:968
github.com/pingcap/tiup/components/cluster/command.Execute()
github.com/pingcap/tiup/components/cluster/command/root.go:251 +0x271
main.main()
github.com/pingcap/tiup/components/cluster/main.go:23 +0x45

1 个赞

可能是 TiUP 的 bug

1 个赞

TiUP 版本信息:tiup --version
1.16.3 tiup
Go Version: go1.24.1
Git Ref: v1.16.3
GitHash: 365c08ebd0ce125589c47df24b854e8f032f0e3d

1 个赞

[quote=“TiDBer_jDlk7IQj, post:1, topic:1046271”]
panic: runtime error: invalid memory address or nil pointer dereference
[/quote] 看到这个报错。就是懵的

1 个赞

空指针异常,应该是碰到bug了

tiup cluster display命令能执行么?

可以执行的,各个节点状态都是 up 的,只是 reload 时会出现错误。

reload的时候加上这个参数试试,看看还报错么?定位一下是 刷新报错 还是 重启报错。

好,稍晚些我试试👍

应该是reload的bug。重启一下。在执行试试

应该是这个问题,刚修的https://github.com/pingcap/tiup/commit/af2bb99a98d076da99e14c036bcfdd12069f2bb5

你用的是不是在线的镜像库?
升级一下 tiup 就好

tiup update --self

确保 GitHash 为 af2bb99a98d076da99e14c036bcfdd12069f2bb5 就行。

$ tiup --version
1.16.3 tiup
Go Version: go1.24.1
Git Ref: v1.16.3
GitHash: af2bb99a98d076da99e14c036bcfdd12069f2bb5

升级到这个版本了,问题依然存在。

发一下 tiup --version和 tiup cluster --version 的结果

大佬康康:
tiup --version
1.16.3 tiup
Go Version: go1.24.1
Git Ref: v1.16.3
GitHash: af2bb99a98d076da99e14c036bcfdd12069f2bb5

tiup cluster --version
tiup version 1.16.3 tiup
Go Version: go1.24.1
Git Ref: v1.16.3
GitHash: 365c08ebd0ce125589c47df24b854e8f032f0e3d

tiup-cluster 的版本没升上去,:thinking:

不行的话你就考虑使用低版本的吧

tiup cluster:v1.16.2 reload clusterxxx 

好使👍

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