When running dumpling without any command line argument, it will crash with following errors:
Release version:
Git commit hash: 2655b67e4a5e01367a0f2cd9355b5d8e98f1583e
Git branch: master
Build timestamp: 2020-05-11 08:17:14Z
Go version: go version go1.14.1 linux/amd64
dump failed: err = err = dial tcp 127.0.0.1:4000: connect: connection refused
goroutine 1 [running]:
runtime/debug.Stack(0xa13a60, 0xc000080190, 0xa14400)
/usr/local/go/src/runtime/debug/stack.go:24 +0x9d
github.com/pingcap/dumpling/v4/export.withStack(0xa13a60, 0xc000080190, 0xc0000aa040, 0x95bdcf)
/home/tidb/luancheng/dumpling/v4/export/error.go:40 +0x8d
github.com/pingcap/dumpling/v4/export.simpleQuery(0xc000144180, 0x95bdcf, 0x10, 0xc000073998, 0xc000010088, 0x0)
/home/tidb/luancheng/dumpling/v4/export/sql.go:367 +0x152
github.com/pingcap/dumpling/v4/export.SelectVersion(0xc000144180, 0x2a, 0x434466, 0xc00002a0f0, 0xc00007a1a0)
/home/tidb/luancheng/dumpling/v4/export/sql.go:94 +0x81
github.com/pingcap/dumpling/v4/export.detectServerInfo(0xc000144180, 0x5, 0xc00002a0f0, 0x2a, 0xc000144180)
/home/tidb/luancheng/dumpling/v4/export/prepare.go:30 +0x2f
github.com/pingcap/dumpling/v4/export.Dump(0xc00010e780, 0x0, 0x0)
/home/tidb/luancheng/dumpling/v4/export/dump.go:35 +0x2cb
main.run()
/home/tidb/luancheng/dumpling/cmd/dumpling/main.go:122 +0x5b9
main.glob..func1(0xd6e380, 0xda2790, 0x0, 0x0)
/home/tidb/luancheng/dumpling/cmd/dumpling/main.go:58 +0x20
github.com/spf13/cobra.(*Command).execute(0xd6e380, 0xc0000921b0, 0x0, 0x0, 0xd6e380, 0xc0000921b0)
/home/tidb/go/pkg/mod/github.com/spf13/[email protected]/command.go:844 +0x29d
github.com/spf13/cobra.(*Command).ExecuteC(0xd6e380, 0x0, 0x1, 0xc000082058)
/home/tidb/go/pkg/mod/github.com/spf13/[email protected]/command.go:945 +0x317
github.com/spf13/cobra.(*Command).Execute(...)
/home/tidb/go/pkg/mod/github.com/spf13/[email protected]/command.go:885
main.main()
/home/tidb/luancheng/dumpling/cmd/dumpling/main.go:131 +0x2d
goroutine 1 [running]:
runtime/debug.Stack(0xa14400, 0xc000095260, 0xa14400)
/usr/local/go/src/runtime/debug/stack.go:24 +0x9d
github.com/pingcap/dumpling/v4/export.withStack(0xa14400, 0xc000095260, 0x10, 0xc000073998)
/home/tidb/luancheng/dumpling/v4/export/error.go:40 +0x8d
github.com/pingcap/dumpling/v4/export.SelectVersion(0xc000144180, 0x2a, 0x434466, 0xc00002a0f0, 0xc00007a1a0)
/home/tidb/luancheng/dumpling/v4/export/sql.go:96 +0x9e
github.com/pingcap/dumpling/v4/export.detectServerInfo(0xc000144180, 0x5, 0xc00002a0f0, 0x2a, 0xc000144180)
/home/tidb/luancheng/dumpling/v4/export/prepare.go:30 +0x2f
github.com/pingcap/dumpling/v4/export.Dump(0xc00010e780, 0x0, 0x0)
/home/tidb/luancheng/dumpling/v4/export/dump.go:35 +0x2cb
main.run()
/home/tidb/luancheng/dumpling/cmd/dumpling/main.go:122 +0x5b9
main.glob..func1(0xd6e380, 0xda2790, 0x0, 0x0)
/home/tidb/luancheng/dumpling/cmd/dumpling/main.go:58 +0x20
github.com/spf13/cobra.(*Command).execute(0xd6e380, 0xc0000921b0, 0x0, 0x0, 0xd6e380, 0xc0000921b0)
/home/tidb/go/pkg/mod/github.com/spf13/[email protected]/command.go:844 +0x29d
github.com/spf13/cobra.(*Command).ExecuteC(0xd6e380, 0x0, 0x1, 0xc000082058)
/home/tidb/go/pkg/mod/github.com/spf13/[email protected]/command.go:945 +0x317
github.com/spf13/cobra.(*Command).Execute(...)
/home/tidb/go/pkg/mod/github.com/spf13/[email protected]/command.go:885
main.main()
/home/tidb/luancheng/dumpling/cmd/dumpling/main.go:131 +0x2d
It's better to print help info when running without argument.