-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic when exec "pd health" with tls #8237
Comments
/severity major |
@JmPotato why do we need check if get the cluster information successfully before init PDClient? PD client has the feature of service discover.🤔 |
Because even in the interact mode, we can use |
ref #7300, close #8237 fix panic when call pd-ctl cluster with tls Signed-off-by: ti-chi-bot <[email protected]> Signed-off-by: okJiang <[email protected]> Co-authored-by: okJiang <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Bug Report
What did you do?
1、tiup deploy cluster
2、exec "pd health" with tls
tiup ctl:nightly pd -u https://pd1-peer:2379 health --cacert /root/.tiup/storage/cluster/clusters/tidbcluster/tls/ca.crt --cert /root/.tiup/storage/cluster/clusters/tidbcluster/tls/client.crt --key /root/.tiup/storage/cluster/clusters/tidbcluster/tls/client.pem Starting component ctl: /root/.tiup/components/ctl/v8.2.0-alpha-nightly/ctl pd -u https://pd1-peer:2379 health --cacert /root/.tiup/storage/cluster/clusters/tidbcluster/tls/ca.crt --cert /root/.tiup/storage/cluster/clusters/tidbcluster/tls/client.crt --key /root/.tiup/storage/cluster/clusters/tidbcluster/tls/client.pem
What did you expect to see?
cmd can success
What did you see instead?
cmd panic:
`panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x98 pc=0x11afa05]
goroutine 1 [running]:
github.com/tikv/pd/tools/pd-ctl/pdctl/command.showHealthCommandFunc(0xc000599800, {0x14c4cf6?, 0x4?, 0x14c4bae?})
/workspace/source/pd/tools/pd-ctl/pdctl/command/health_command.go:33 +0x25
github.com/spf13/cobra.(*Command).execute(0xc000599800, {0xc00034af00, 0x8, 0x8})
/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:987 +0xaa3
github.com/spf13/cobra.(*Command).ExecuteC(0xc0000bb800)
/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039
github.com/tikv/pd/tools/pd-ctl/pdctl.MainStart({0xc00012c0b0, 0x9, 0x9})
/workspace/source/pd/tools/pd-ctl/pdctl/ctl.go:105 +0x228
main.main()
/workspace/source/pd/tools/pd-ctl/main.go:67 +0x3cf`
What version of PD are you using (
pd-server -V
)?The text was updated successfully, but these errors were encountered: