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

Node panics when CA certificates are missing #4208

@the-smooth-operator

Description

@the-smooth-operator

In a fresh Debian/Ubuntu server or Docker image run Polkadot in dev mode polkadot --dev and the node panics.

2021-11-02 11:24:11 Running in --dev mode, RPC CORS has been disabled.
2021-11-02 11:24:11 Parity Polkadot
2021-11-02 11:24:11 ✌️  version 0.9.12-ec34cf7e0-x86_64-linux-gnu
2021-11-02 11:24:11 ❤️  by Parity Technologies <[email protected]>, 2017-2021
2021-11-02 11:24:11 📋 Chain specification: Development
2021-11-02 11:24:11 🏷 Node name: careful-train-9664
2021-11-02 11:24:11 👤 Role: AUTHORITY
2021-11-02 11:24:11 💾 Database: RocksDb at /data/chains/dev/db/full
2021-11-02 11:24:11 ⛓  Native runtime: polkadot-9120 (parity-polkadot-0.tx8.au0)
2021-11-02 11:24:11 👶 Creating empty BABE epoch changes on what appears to be first startup.
2021-11-02 11:24:11 🏷 Local node identity is: 12D3KooWArti2EWqvoPp5RTBJd3kERThbvauavJbzX5891MGEv6Q

====================

Version: 0.9.12-ec34cf7e0-x86_64-linux-gnu

   0: sp_panic_handler::set::{{closure}}
   1: std::panicking::rust_panic_with_hook
             at rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:628:17
   2: std::panicking::begin_panic::{{closure}}
   3: std::sys_common::backtrace::__rust_end_short_backtrace
   4: std::panicking::begin_panic
   5: hyper_rustls::connector::HttpsConnector<hyper::client::connect::http::HttpConnector>::with_native_roots
   6: sc_offchain::api::http::SharedClient::new
   7: sc_offchain::OffchainWorkers<Client,Block>::new
   8: sc_service::builder::build_offchain_workers
   9: polkadot_service::new_full
  10: polkadot_service::build_full
  11: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  12: tokio::park::thread::CachedParkThread::block_on
  13: tokio::runtime::thread_pool::ThreadPool::block_on
  14: tokio::runtime::Runtime::block_on
  15: sc_cli::runner::Runner<C>::run_node_until_exit
  16: polkadot_cli::command::run
  17: polkadot::main
  18: std::sys_common::backtrace::__rust_begin_short_backtrace
  19: std::rt::lang_start::{{closure}}
  20: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ops/function.rs:259:13
      std::panicking::try::do_call
             at rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:403:40
      std::panicking::try
             at rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:367:19
      std::panic::catch_unwind
             at rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panic.rs:129:14
      std::rt::lang_start_internal::{{closure}}
             at rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/rt.rs:45:48
      std::panicking::try::do_call
             at rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:403:40
      std::panicking::try
             at rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:367:19
      std::panic::catch_unwind
             at rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panic.rs:129:14
      std::rt::lang_start_internal
             at rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/rt.rs:45:20
  21: main
  22: __libc_start_main
  23: _start


Thread 'main' panicked at 'no CA certificates found', /usr/local/cargo/registry/src/github.amrom.workers.dev-1ecc6299db9ec823/hyper-rustls-0.22.1/src/connector.rs:45

This is a bug. Please report it at:

	https://github.com/paritytech/polkadot/issues/new

After installed missing certificates: apt-get install ca-certificates the node starts again.

The node should catch this and exit with a proper error message rather than panicking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions