Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Collator node throws incorrect warnings on startup #24

Closed
JoshOrndorff opened this issue Nov 29, 2019 · 3 comments · Fixed by #53
Closed

Collator node throws incorrect warnings on startup #24

JoshOrndorff opened this issue Nov 29, 2019 · 3 comments · Fixed by #53

Comments

@JoshOrndorff
Copy link
Contributor

When starting the collator node, it reliably prints errors like

Unable to bind server to 127.0.0.1:9955. Trying random port.
Not a valid bootnode address: /ip4/127.0.0.1/tcp/30333/QmbQMG8VWKumRyXg47UixQiosUMP2nWRsmWRojqDqJTG9t

These messages do not correspond to actual underlying errors. UIs still connect to the websocket port correctly, and the collator still peers with the bootnode at the supposedly invalid address. Possibly related to #19

@bkchr
Copy link
Member

bkchr commented Jan 15, 2020

As written in #34 we should provide some sensible defaults for the relay chain node.

cecton added a commit to paritytech/substrate that referenced this issue Jan 30, 2020
It changes the way we extended the CLI functionalities of substrate to allow more flexibility. (If this was not clear, here is another version: it changes the `sc_cli` API to allow more flexibility).

This touches a few important things:
 - the startup of the async task with tokei:
    This was in node and node-template and I moved it to substrate. The idea is to have 1 time the code that handles unix signals (SIGTERM and SIGINT) properly. It is however possible to make this more generic to wait for a future instead and provide only a helper for the basic handling of SIGTERM and SIGINT.
 - increased the version of structopt and tokei
 - no more use of structopt internal's API
 - less use of generics

Related to #4643 and paritytech/cumulus#42: the implementation of "into_configuration" and "get_config" are similar but with better flexibility so it is now possible in cumulus to have the command-line arguments only of the run command for polkadot if we want

Related to paritytech/cumulus#24 and paritytech/cumulus#34 : it will now be possible to make a configuration struct for polkadot with some overrides of the default parameters much more easily.
cecton added a commit to paritytech/substrate that referenced this issue Feb 6, 2020
These are a few changes I missed during the refactoring.

1. Initialization issue and boilerplate

    Most importantly: part of the `Configuration` initialization was done in `sc_cli::init`. This means the user can not benefit from this initialization boilerplate if they have multiple `Configuration` since `sc_cli::init` can only be called once.

2. Boilerplate for `VersionInfo` and `Configuration`

    I'm also answering to the critic of @bkchr on the initialization using version: https://github.com/paritytech/substrate/pull/4692/files/bea809d4c14a2ede953227ac885e3b3f9771c548#r372047238 This will allow initializing a `Configuration` and provide the version by default.

3. Loading the `chain_spec` explicitly

    In the past it was done automatically but in some cases we want to delay this. I moved the code to `Configuration.load_spec()` so it can be called later on. `chain_spec` can also be written directly to the `Configuration` without using this `load_spec` helper.

4. [deleted]

5. Fixing issue that prevents the user to override the port

    In the refactoring I introduced a bug by mistake that could potentially prevent the CLI user to override the ports if defaults where provided for these ports (only on cumulus).

6. Change task_executor from Box to Arc

    This is useful for cumulus where we have 2 nodes with 2 separate Configuration that need to spawn tasks to the same runtime.

7. Renamed TasksExecutorRequired to TaskExecutor

    For consistency.

This is related to paritytech/cumulus#24

This is the continuation (and hopefully the end of) #4692
@bkchr bkchr closed this as completed in #53 Feb 10, 2020
@JoshOrndorff JoshOrndorff changed the title Collator node thrown incorrect warnings on startup Collator node throws incorrect warnings on startup Feb 10, 2020
@cecton
Copy link
Contributor

cecton commented Feb 10, 2020

This error still exist:

Error on libp2p listener ListenerId(1): Address already in use (os error 98)

@yangmiok
Copy link

yangmiok commented Sep 4, 2020

2020-09-04 22:43:43 📪 Libp2p listener () closed: Address already in use (os error 48)
2020-09-04 22:43:43 📪 Libp2p listener () closed: Address already in use (os error 48)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants