{"record":{"id":"ed7725d51ec86307","repo":"nautechsystems/nautilus_trader","slug":"error-ed7725","errorCode":null,"errorMessage":"{}","messagePattern":"\\{\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/system/src/kernel.rs","lineNumber":815,"sourceCode":"        }\n\n        self.state_save_armed = save_state;\n        self.order_emulator.start();\n\n        if let Err(start_err) = Trader::start_with_component_callbacks(&self.trader) {\n            let stop_result = self.stop_trader_after_start_failure();\n            self.order_emulator.stop();\n            let save_result = self.save_trader_state();\n\n            let mut errors = vec![format!(\"Failed to start trader: {start_err}\")];\n            if let Err(e) = stop_result {\n                errors.push(format!(\"failed to stop partial trader start: {e}\"));\n            }\n\n            if let Err(e) = save_result {\n                errors.push(format!(\"failed to save partial trader state: {e}\"));\n            }\n            anyhow::bail!(\"{}\", errors.join(\"; \"));\n        }\n\n        log::info!(\"Trader started\");\n        Ok(())\n    }\n\n    /// Stops the trader and its registered components.\n    ///\n    /// This method initiates a graceful shutdown of trading components (strategies, actors)\n    /// which may trigger residual events such as order cancellations. The caller should\n    /// continue processing events after calling this method to handle these residual events.\n    pub fn stop_trader(&mut self) {\n        disarm_shutdown_on_error();\n\n        if !self.trader.borrow().is_running() {\n            return;\n        }\n","sourceCodeStart":797,"sourceCodeEnd":833,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/system/src/kernel.rs#L797-L833","documentation":"Kernel::start_trader collects all errors that occur while starting the trader and its components; if starting the trader fails partway, it also attempts to stop the partial start and save state, appending any secondary errors. All accumulated errors are joined with '; ' and returned as a single anyhow error whose message is exactly that joined string. The dynamic '{}' message therefore contains every failure from the start sequence.","triggerScenarios":"Any failure during trader start (client registration failures, engine start errors, data or execution client connect failures), especially when the rollback stop/save also produces errors, yielding a compound message.","commonSituations":"Misconfigured client credentials or venue connectivity during live start; an engine failing to initialize causing partial-start rollback; disk issues making the partial-state save fail and adding a second error to the message.","solutions":["Read the joined message and address the first error — that is the root cause of the partial start","Fix the failing component identified in the first error (credentials, connectivity, config)","Re-run; if secondary errors persist, fix stopping/saving problems after the root cause is resolved","Check logs preceding the error for the component-level stack trace"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-validate components before starting the trader\nfor client in clients {\n    anyhow::ensure!(client.is_connected(), \"client {} not connected before start\", client.id());\n}","typeGuard":null,"tryCatchPattern":"match kernel.start_trader().await {\n    Err(e) => {\n        // message may join multiple failures with '; ' — split and log each\n        for part in e.to_string().split(\"; \") {\n            log::error!(\"start failure: {part}\");\n        }\n    }\n    Ok(()) => {}\n}","preventionTips":["Verify client connectivity and credentials before start","Read the first segment of the joined error as the root cause","Keep disk writable so partial-state saves do not add secondary errors"],"tags":["rust","kernel","startup","aggregated-errors"],"backgroundTag":"invalid-state-transition","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}