Open WayneWayner opened 1 year ago
When starting a bridge node and for example port 26657 is not reachable you will get the following error message:
2023-03-15T11:00:55.692Z INFO basichost basic/natmgr.go:93 DiscoverNAT error:no NAT found 2023-03-15T11:01:00.697Z ERROR node nodebuilder/node.go:95 starting Bridge Node: OnStart hook added by go.uber.org/fx.(*lifecycleHookAnnotation).Build.func1 failed: context deadline exceeded go.uber.org/fx.(*lifecycleHookAnnotation).Build.func1.1() took 234.733µs from: go.uber.org/fx.(*lifecycleHookAnnotation).Build.func1 (/home/bridgoooooor/go/pkg/mod/go.uber.org/fx@v1.18.2/annotated.go:447) github.com/celestiaorg/celestia-node/share/p2p/shrexsub.(*PubSub).Start-fm() took 14.857µs from: github.com/celestiaorg/celestia-node/nodebuilder/share.ConstructModule.func20 (/home/bridgoooooor/celestia-node/nodebuilder/share/module.go:145) go.uber.org/fx.(*lifecycleHookAnnotation).Build.func1.1() took 10.92µs from: go.uber.org/fx.(*lifecycleHookAnnotation).Build.func1 (/home/bridgoooooor/go/pkg/mod/go.uber.org/fx@v1.18.2/annotated.go:447) go.uber.org/fx.(*lifecycleHookAnnotation).Build.func1.1() took 5.66µs from: go.uber.org/fx.(*lifecycleHookAnnotation).Build.func1 (/home/bridgoooooor/go/pkg/mod/go.uber.org/fx@v1.18.2/annotated.go:447) github.com/celestiaorg/celestia-node/nodebuilder/p2p.peerRouting.func1() took 481ns from: github.com/celestiaorg/celestia-node/nodebuilder/p2p.peerRouting (/home/bridgoooooor/celestia-node/nodebuilder/p2p/routing.go:43) Error: node: failed to start: OnStart hook added by go.uber.org/fx.(*lifecycleHookAnnotation).Build.func1 failed: context deadline exceeded go.uber.org/fx.(*lifecycleHookAnnotation).Build.func1.1() took 234.733µs from: go.uber.org/fx.(*lifecycleHookAnnotation).Build.func1 (/home/bridgoooooor/go/pkg/mod/go.uber.org/fx@v1.18.2/annotated.go:447) github.com/celestiaorg/celestia-node/share/p2p/shrexsub.(*PubSub).Start-fm() took 14.857µs from: github.com/celestiaorg/celestia-node/nodebuilder/share.ConstructModule.func20 (/home/bridgoooooor/celestia-node/nodebuilder/share/module.go:145) go.uber.org/fx.(*lifecycleHookAnnotation).Build.func1.1() took 10.92µs from: go.uber.org/fx.(*lifecycleHookAnnotation).Build.func1 (/home/bridgoooooor/go/pkg/mod/go.uber.org/fx@v1.18.2/annotated.go:447) go.uber.org/fx.(*lifecycleHookAnnotation).Build.func1.1() took 5.66µs from: go.uber.org/fx.(*lifecycleHookAnnotation).Build.func1 (/home/bridgoooooor/go/pkg/mod/go.uber.org/fx@v1.18.2/annotated.go:447) github.com/celestiaorg/celestia-node/nodebuilder/p2p.peerRouting.func1() took 481ns from: github.com/celestiaorg/celestia-node/nodebuilder/p2p.peerRouting (/home/bridgoooooor/celestia-node/nodebuilder/p2p/routing.go:43)
It would be good if we check the accessibility of the ports before and then issue an error message which port is not accessible.
I was able to reproduce this error by blocking the port and trying to run a bridge node. I can have a look at this if the issues is assigned to me (and if its considered a useful feature).
Implementation ideas
When starting a bridge node and for example port 26657 is not reachable you will get the following error message:
It would be good if we check the accessibility of the ports before and then issue an error message which port is not accessible.