nautechsystems/nautilus_trader · error
Failed to stop one or more trader components after startup f
Error message
Failed to stop one or more trader components after startup failure: {} What it means
Aggregated teardown report in stop_components_after_start_failure: after a failed startup every component still gets a stop attempt; any per-component stop or subscription-cleanup failures are collected into this joined error.
Source
Thrown at crates/system/src/trader.rs:1161
if let Err(e) = self.cleanup_exec_algorithm_subscriptions(exec_algorithm_id) {
errors.push(format!(
"execution algorithm {exec_algorithm_id} subscription cleanup: {e:#}"
));
}
}
for strategy_id in &self.strategy_ids {
log::debug!("Stopping strategy {strategy_id} after startup failure");
if let Err(e) = Self::stop_component_if_active(strategy_id.inner()) {
errors.push(format!("strategy {strategy_id}: {e:#}"));
}
}
if errors.is_empty() {
Ok(())
} else {
anyhow::bail!(
"Failed to stop one or more trader components after startup failure: {}",
errors.join("; ")
)
}
}
fn stop_component_if_active(component_id: Ustr) -> anyhow::Result<()> {
if !matches!(
component_state(&component_id)?,
ComponentState::Starting | ComponentState::Running
) {
return Ok(());
}
stop_component(&component_id)
}
/// Resets all registered components.View on GitHub (pinned to 18893faf8b)
Solutions
- Inspect the collected per-component errors in the message
- Stop or dispose the failing components manually before retrying startup
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at crates/system/src/trader.rs:1161 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/186a1e42e7fbb72e.
Report an issue: GitHub.