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

Panic when running giganto without --ca-certs option #831

Closed
msk opened this issue Sep 16, 2024 · 0 comments · Fixed by #839
Closed

Panic when running giganto without --ca-certs option #831

msk opened this issue Sep 16, 2024 · 0 comments · Fixed by #839
Assignees

Comments

@msk
Copy link
Contributor

msk commented Sep 16, 2024

I'm experiencing a panic when running giganto version 0.21.0-alpha.2 (commit b8756ed) without providing the --ca-certs option.

Steps to reproduce:

  1. Run giganto with the following command:
giganto -c config.toml --cert tests/certs/node1/cert.pem --key tests/certs/node1/key.pem
  1. Observe the panic with the following error message:
thread 'main' panicked at src/publish.rs:73:34:
server configuration error with cert, key or root: no root trust anchors were provided

Config file:

My config.toml file contains the following:

log_dir = "log"
export_dir = "export"
data_dir = "data"

Stack backtrace:

Running with RUST_BACKTRACE=1 environment variable produces the following stack backtrace:

Stack backtrace:
   0: std::backtrace::Backtrace::create
   1: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
   2: giganto::server::config_server
   3: giganto::main::{{closure}}
   4: tokio::runtime::runtime::Runtime::block_on
   5: giganto::main
   6: std::sys::backtrace::__rust_begin_short_backtrace
   7: std::rt::lang_start::{{closure}}
   8: std::rt::lang_start_internal
   9: _main
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: giganto::main::{{closure}}
   4: tokio::runtime::runtime::Runtime::block_on
   5: giganto::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Expected behavior:

I expect giganto to handle the absence of the --ca-certs option more gracefully, perhaps by providing a more informative error message.

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

Successfully merging a pull request may close this issue.

2 participants