tiup icon indicating copy to clipboard operation
tiup copied to clipboard

panic: can't get a free port

Open glkappe opened this issue 3 years ago • 0 comments

the error is not friendly when --host does not exist

172.16.7.122@1root:~# tiup playground v4.0.14 --host 172.15.4.111 tiup is checking updates for component playground ... A new version of playground is available: The latest version: v1.9.5 Local installed version: Update current component: tiup update playground Update all components: tiup update --all

The component playground version is not installed; downloading from repository. download https://tiup-mirrors.pingcap.com/playground-v1.9.5-linux-amd64.tar.gz 6.91 MiB / 6.91 MiB 100.00% 2.85 MiB/s Starting component playground: /root/.tiup/components/playground/v1.9.5/tiup-playground /root/.tiup/components/playground/v1.9.5/tiup-playground v4.0.14 --host 172.15.4.111 panic: can't get a free port

goroutine 1 [running]: github.com/pingcap/tiup/pkg/utils.MustGetFreePort(...) github.com/pingcap/tiup/pkg/utils/freeport.go:42 github.com/pingcap/tiup/components/playground/instance.NewPDInstance({0x0, 0x0}, {0xc000120880, 0x1d}, {0x7ffd8c35b492, 0x0}, {0x0, 0x0}, 0x0) github.com/pingcap/tiup/components/playground/instance/pd.go:43 +0x19d main.(*Playground).addInstance(0xc0000fd400, {0xfe8d8d, 0x7f1564dfc270}, {{0x0, 0x0}, {0x0, 0x0}, 0x1, {0x0, 0x0}, ...}) github.com/pingcap/tiup/components/playground/playground.go:639 +0x325 main.(*Playground).bootCluster(0xc0000fd400, {0x115be50, 0xc0002bdce0}, 0x1, 0x18fe200) github.com/pingcap/tiup/components/playground/playground.go:809 +0x725 main.execute.func3(0xc0000cbb80, {0xc0002bc300, 0x1, 0x3}) github.com/pingcap/tiup/components/playground/main.go:289 +0x875 github.com/spf13/cobra.(*Command).execute(0xc0000cbb80, {0xc0000d0050, 0x3, 0x3}) github.com/spf13/[email protected]/command.go:856 +0x60e github.com/spf13/cobra.(*Command).ExecuteC(0xc0000cbb80) github.com/spf13/[email protected]/command.go:974 +0x3bc github.com/spf13/cobra.(*Command).Execute(...) github.com/spf13/[email protected]/command.go:902 main.execute() github.com/pingcap/tiup/components/playground/main.go:354 +0x1059 main.main() github.com/pingcap/tiup/components/playground/main.go:631 +0x3f 172.16.7.122@2root:~#

glkappe avatar May 13 '22 02:05 glkappe