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

cli: should give more graceful output on connection issues #11

Open
torkelrogstad opened this issue Jan 20, 2025 · 0 comments
Open

cli: should give more graceful output on connection issues #11

torkelrogstad opened this issue Jan 20, 2025 · 0 comments

Comments

@torkelrogstad
Copy link
Contributor

This is the output when trying to connect to a non-accessible location.

❮ cargo run --bin thunder_app_cli -- --rpc-addr 172.105.148.135:6009 balance
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.65s
     Running `target/debug/thunder_app_cli --rpc-addr '172.105.148.135:6009' balance`
Error: client error (Connect)

Caused by:
    0: tcp connect error: Connection refused (os error 61)
    1: Connection refused (os error 61)

Stack backtrace:
   0: std::backtrace_rs::backtrace::libunwind::trace
             at /rustc/99db2737c91d1e4b36b2ffc17dcda5878bcae625/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1: std::backtrace_rs::backtrace::trace_unsynchronized
             at /rustc/99db2737c91d1e4b36b2ffc17dcda5878bcae625/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2: std::backtrace::Backtrace::create
             at /rustc/99db2737c91d1e4b36b2ffc17dcda5878bcae625/library/std/src/backtrace.rs:331:13
   3: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
             at /Users/torkel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.95/src/backtrace.rs:27:14
   4: <core::result::Result<T,F> as core::ops::try_trait::FromResidual<core::result::Result<core::convert::Infallible,E>>>::from_residual
             at /Users/torkel/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/result.rs:2014:27
   5: thunder_app_cli_lib::Cli::run::{{closure}}
             at ./cli/lib.rs:95:31
   6: thunder_app_cli::main::{{closure}}
             at ./cli/main.rs:7:25
   7: tokio::runtime::park::CachedParkThread::block_on::{{closure}}
             at /Users/torkel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/park.rs:284:63
   8: tokio::runtime::coop::with_budget
             at /Users/torkel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/coop.rs:107:5
   9: tokio::runtime::coop::budget
             at /Users/torkel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/coop.rs:73:5
  10: tokio::runtime::park::CachedParkThread::block_on
             at /Users/torkel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/park.rs:284:31
  11: tokio::runtime::context::blocking::BlockingRegionGuard::block_on
             at /Users/torkel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/context/blocking.rs:66:9
  12: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}}
             at /Users/torkel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/scheduler/multi_thread/mod.rs:87:13
  13: tokio::runtime::context::runtime::enter_runtime
             at /Users/torkel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/context/runtime.rs:65:16
  14: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
             at /Users/torkel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/scheduler/multi_thread/mod.rs:86:9
  15: tokio::runtime::runtime::Runtime::block_on_inner
             at /Users/torkel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/runtime.rs:370:45
  16: tokio::runtime::runtime::Runtime::block_on
             at /Users/torkel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/runtime/runtime.rs:342:13
  17: thunder_app_cli::main
             at ./cli/main.rs:9:5
  18: core::ops::function::FnOnce::call_once
             at /Users/torkel/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
  19: std::sys::backtrace::__rust_begin_short_backtrace
             at /Users/torkel/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:152:18
  20: std::rt::lang_start::{{closure}}
             at /Users/torkel/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs:194:18
  21: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/99db2737c91d1e4b36b2ffc17dcda5878bcae625/library/core/src/ops/function.rs:284:13
  22: std::panicking::try::do_call
             at /rustc/99db2737c91d1e4b36b2ffc17dcda5878bcae625/library/std/src/panicking.rs:587:40
  23: std::panicking::try
             at /rustc/99db2737c91d1e4b36b2ffc17dcda5878bcae625/library/std/src/panicking.rs:550:19
  24: std::panic::catch_unwind
             at /rustc/99db2737c91d1e4b36b2ffc17dcda5878bcae625/library/std/src/panic.rs:358:14
  25: std::rt::lang_start_internal::{{closure}}
             at /rustc/99db2737c91d1e4b36b2ffc17dcda5878bcae625/library/std/src/rt.rs:163:24
  26: std::panicking::try::do_call
             at /rustc/99db2737c91d1e4b36b2ffc17dcda5878bcae625/library/std/src/panicking.rs:587:40
  27: std::panicking::try
             at /rustc/99db2737c91d1e4b36b2ffc17dcda5878bcae625/library/std/src/panicking.rs:550:19
  28: std::panic::catch_unwind
             at /rustc/99db2737c91d1e4b36b2ffc17dcda5878bcae625/library/std/src/panic.rs:358:14
  29: std::rt::lang_start_internal
             at /rustc/99db2737c91d1e4b36b2ffc17dcda5878bcae625/library/std/src/rt.rs:159:5
  30: std::rt::lang_start
             at /Users/torkel/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs:193:5
  31: _main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant