signal18 / replication-manager

Signal 18 repman - Replication Manager for MySQL / MariaDB / Percona Server
https://signal18.io/products/srm
GNU General Public License v3.0
647 stars 167 forks source link

replication-manager-cli command stop having a default cluster if exists ! #496

Open nyxneuf opened 1 year ago

nyxneuf commented 1 year ago

[root@localhost]# replication-manager-cli version Replication Manager v2.3.10 for MariaDB 10.x and MySQL 5.7 Series Full Version: v2.3.10 Build Time: 2023-06-20T18:55:30+0900

[root@localhost]# replication-manager-cli console panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]: github.com/signal18/replication-manager/clients.cliGetServers() /root/go/src/github.com/replication-manager/clients/client_cmd.go:504 +0x84e github.com/signal18/replication-manager/clients.cliInit(0x0) /root/go/src/github.com/replication-manager/clients/client_cmd.go:155 +0x316 github.com/signal18/replication-manager/clients.glob..func8(0x3f7d600, {0x22ffade, 0x0, 0x0}) /root/go/src/github.com/replication-manager/clients/client_console.go:29 +0x38 github.com/spf13/cobra.(Command).execute(0x3f7d600, {0x3fdc458, 0x0, 0x0}) /root/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:844 +0x5f8 github.com/spf13/cobra.(Command).ExecuteC(0x3f7bbc0) /root/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:945 +0x38d github.com/spf13/cobra.(*Command).Execute(...) /root/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:885 github.com/signal18/replication-manager/clients.Execute() /root/go/src/github.com/replication-manager/clients/client_cmd.go:99 +0x25 main.main() /root/go/src/github.com/replication-manager/main_client.go:24 +0x19

[root@localhost]# replication-manager-cli switchover FATA[0000] No cluster specify use --cluster in values [] error="No cluster specify"

[root@localhost]# replication-manager-cli topology FATA[0000] No cluster specify use --cluster in values [] error="No cluster specify"

[root@localhost]# replication-manager-cli status panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]: github.com/signal18/replication-manager/clients.cliGetServers() /root/go/src/github.com/replication-manager/clients/client_cmd.go:504 +0x84e github.com/signal18/replication-manager/clients.cliInit(0x0) /root/go/src/github.com/replication-manager/clients/client_cmd.go:155 +0x316 github.com/signal18/replication-manager/clients.glob..func17(0x3f7c640, {0x22ffade, 0x0, 0x0}) /root/go/src/github.com/replication-manager/clients/client_status.go:26 +0x55 github.com/spf13/cobra.(Command).execute(0x3f7c640, {0x3fdc458, 0x0, 0x0}) /root/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:844 +0x5f8 github.com/spf13/cobra.(Command).ExecuteC(0x3f7bbc0) /root/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:945 +0x38d github.com/spf13/cobra.(*Command).Execute(...) /root/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:885 github.com/signal18/replication-manager/clients.Execute() /root/go/src/github.com/replication-manager/clients/client_cmd.go:99 +0x25 main.main() /root/go/src/github.com/replication-manager/main_client.go:24 +0x19 [root@localhost]# replication-manager-cli status INFO[0000] ERROR in login unexpected end of JSON input

emmaloubersac commented 1 year ago

Could I have more information on the replication-manager configuration?

nyxneuf commented 1 year ago

OS is RockyLinux 8 x86_64

Previously used 2.2.40 and had no problems (replication-manager-osc-2.2.40-1.x86_64.rpm)

I upgraded 2.3.10 by building the develop source.

Do I need a config file?

emmaloubersac commented 1 year ago

Yes, can I see it?

svaroqui commented 1 year ago

Hi, emmaloubersac

This should not crash but instead complain about missing server monitor to connect to

nyxneuf commented 1 year ago

Up to v2.3.5 it works normally. v2.3.6 or higher causes problems.