radondb / xenon

The MySQL Cluster Autopilot Management with GTID and Raft
GNU General Public License v3.0
693 stars 162 forks source link

xenoncli cluster status报错 #165

Open Myshiner opened 2 years ago

Myshiner commented 2 years ago

xenoncli cluster status查看集群状态时报错: cluster.go:224: unexpected error: open /home/mysql/config.path: no such file or directory

2022/08/04 17:45:11.955666 [PANIC] open /home/mysql/config.path: no such file or directory panic: [PANIC] open /home/mysql/config.path: no such file or directory

goroutine 1 [running]: xbase/xlog.(Log).Panic(0xc0000f82d0, 0x8d17ba, 0x2, 0xc0000b3b18, 0x1, 0x1) /usr/local/xenon/src/xbase/xlog/xlog.go:142 +0x153 cli/cmd.ErrorOK(0x9711c0, 0xc0000fe990) /usr/local/xenon/src/cli/cmd/common.go:35 +0x246 cli/cmd.clusterStatusCommandFn(0xc000154fc0, 0xcb1a20, 0x0, 0x0) /usr/local/xenon/src/cli/cmd/cluster.go:224 +0x5b vendor/github.com/spf13/cobra.(Command).execute(0xc000154fc0, 0xcb1a20, 0x0, 0x0, 0xc000154fc0, 0xcb1a20) /usr/local/xenon/src/vendor/github.com/spf13/cobra/command.go:603 +0x23e vendor/github.com/spf13/cobra.(Command).ExecuteC(0xc8c740, 0xc0000b3f78, 0xc0000b3f88, 0x4073af) /usr/local/xenon/src/vendor/github.com/spf13/cobra/command.go:689 +0x2be vendor/github.com/spf13/cobra.(Command).Execute(...) /usr/local/xenon/src/vendor/github.com/spf13/cobra/command.go:648 main.main() /usr/local/xenon/src/cli/cli.go:43 +0x32 我明明是echo "/etc/xenon/xenon.json" > /usr/local/xenon/bin/config.path,为什么要去找/home/mysql/config.path呢?

caphash commented 2 years ago

你好,

  1. 需要检查下 /usr/local/xenon/bin/config.path 是否与xenon和xenoncli二进制同目录。
  2. xeoncli cluster status 没有使用完整路径查看状态时默认去寻找 home 目录了。