Skip to content
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

[bug] Cannot connect to substrate node after 20 retries #517

Closed
lexnv opened this issue Apr 26, 2022 · 1 comment · Fixed by #518
Closed

[bug] Cannot connect to substrate node after 20 retries #517

lexnv opened this issue Apr 26, 2022 · 1 comment · Fixed by #518
Assignees
Labels
bug Something isn't working

Comments

@lexnv
Copy link
Contributor

lexnv commented Apr 26, 2022

The issue is causing the cargo clippy to fail.

First observed by the PR #516 when it was merged to master, but the PR is unrelated to the issue.

Details

/home/runner/.cargo/bin/cargo clippy --all-targets -- -D warnings
...

    Compiling test-runtime v0.20.0 (/home/runner/work/subxt/subxt/test-runtime)
error: failed to run custom build command for `test-runtime v0.20.0 (/home/runner/work/subxt/subxt/test-runtime)`

Caused by:
  process didn't exit successfully: `/home/runner/work/subxt/subxt/target/debug/build/test-runtime-b77627502b6263a0/build-script-build` (exit status: 101)
  --- stderr
  2022-04-26 08:30:47 Substrate Node    
  2022-04-26 08:30:47 ✌️  version 3.0.0-dev-59a2150    
  2022-04-26 08:30:47 ❤️  by Parity Technologies <admin@parity.io>, 2017-2022    
  2022-04-26 08:30:47 📋 Chain specification: Development    
  2022-04-26 08:30:47 🏷  Node name: evanescent-tax-4468    
  2022-04-26 08:30:47 👤 Role: AUTHORITY    
  2022-04-26 08:30:47 💾 Database: RocksDb at /tmp/substratef7L8xN/chains/dev/db/full    
  2022-04-26 08:30:47 ⛓  Native runtime: node-268 (substrate-node-0.tx2.au10)    
  2022-04-26 08:30:50 [0] 💸 generated 1 npos voters, 1 from validators and 0 nominators    
  2022-04-26 08:30:58 🔨 Initializing Genesis block/state (state: 0x0e34…b8bb, header-hash: 0xaa3a…58c1)    
  2022-04-26 08:30:58 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.    
  2022-04-26 08:31:07 👶 Creating empty BABE epoch changes on what appears to be first startup.    
  2022-04-26 08:31:07 Using default protocol ID "sup" because none is configured in the chain specs    
  2022-04-26 08:31:07 🏷  Local node identity is: 12D3KooWJHiiuWNRad43dntQrJGqA36ywtKvse5GvfJGpnZuQwtx    
  2022-04-26 08:31:07 💻 Operating system: linux    
  2022-04-26 08:31:07 💻 CPU architecture: x86_64    
  2022-04-26 08:31:07 💻 Target environment: gnu    
  2022-04-26 08:31:07 💻 CPU: Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz    
  2022-04-26 08:31:07 💻 CPU cores: 2    
  2022-04-26 08:31:07 💻 Memory: 6946MB    
  2022-04-26 08:31:07 💻 Kernel: 5.13.0-1021-azure    
  2022-04-26 08:31:07 💻 Linux distribution: Ubuntu 20.04.4 LTS    
  2022-04-26 08:31:07 💻 Virtual machine: yes    
  2022-04-26 08:31:07 📦 Highest known block at #0    
  2022-04-26 08:31:07 〽️ Prometheus exporter started at 127.0.0.1:9615    
  2022-04-26 08:31:07 Listening for new connections on 127.0.0.1:45423.    
  2022-04-26 08:31:07 🏁 CPU score: 518MB/s    
  2022-04-26 08:31:07 🏁 Memory score: 7205MB/s    
  2022-04-26 08:31:07 🏁 Disk score (seq. writes): 227MB/s    
  2022-04-26 08:31:07 🏁 Disk score (rand. writes): 104MB/s    
  2022-04-26 08:31:07 👶 Starting BABE Authorship worker    
  thread 'main' panicked at 'Cannot connect to substrate node after 20 retries', test-runtime/build.rs:72:17
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
Error: The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
@lexnv lexnv added the bug Something isn't working label Apr 26, 2022
@lexnv
Copy link
Contributor Author

lexnv commented Apr 26, 2022

Investigation

It seems that the substrate node took around ~ 30s to spawn the RPC server.

08:30:47 Substrate Node 
...
08:31:07 Listening for new connections on 127.0.0.1:45423.  

However, on a local machine, the RPC server is usually spawned in less than 2 seconds.

The test-runtime crate performs 20 retires with 1-second sleep in between.

The issue is caused most probably by an extensive load on the CI machine.

Resolution

  • Extend the retry time for the test-runtime crate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant