nautechsystems/nautilus_trader · error

Cannot start actor, {actor_id} not found

Error message

Cannot start actor, {actor_id} not found

What it means

start_actor was called with an ActorId that is not in the trader's registered actor set; the actor was never added (or was already removed/retired), so there is no component to start and the call fails fast.

Source

Thrown at crates/system/src/trader.rs:1289

    pub fn clear_exec_algorithms(&mut self) -> anyhow::Result<()> {
        for exec_algorithm_id in self.exec_algorithm_ids.clone() {
            log::debug!("Disposing execution algorithm {exec_algorithm_id}");
            self.retire_exec_algorithm(exec_algorithm_id)?;
        }

        Ok(())
    }

    // -- Individual component management ----------------------------------------

    /// Starts the actor with the given `actor_id`.
    ///
    /// # Errors
    ///
    /// Returns an error if the actor is not registered or cannot be started.
    pub fn start_actor(&self, actor_id: &ActorId) -> anyhow::Result<()> {
        if !self.actor_ids.contains(actor_id) {
            anyhow::bail!("Cannot start actor, {actor_id} not found");
        }
        start_component(&actor_id.inner())
    }

    /// Stops the actor with the given `actor_id`.
    ///
    /// # Errors
    ///
    /// Returns an error if the actor is not registered or cannot be stopped.
    pub fn stop_actor(&self, actor_id: &ActorId) -> anyhow::Result<()> {
        if !self.actor_ids.contains(actor_id) {
            anyhow::bail!("Cannot stop actor, {actor_id} not found");
        }
        stop_component(&actor_id.inner())
    }

    /// Removes the actor with the given `actor_id`.
    ///

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Add/register the actor with the trader before starting it
  2. Check the actor ID spelling against the trader's registered actor IDs
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/system/src/trader.rs:1289 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/01fcdb265fea1aec. Report an issue: GitHub.