nautechsystems/nautilus_trader · error
event-store replay did not start
Error message
event-store replay did not start
What it means
The engine detected that an event-store replay was configured but the replay never actually started before the run proceeded. run_impl bails to avoid silently trading without replaying the requested event-store data.
Source
Thrown at crates/backtest/src/engine.rs:809
self.force_stop = false;
self.kernel.reset_shutdown_flag();
// Initialize sync command senders (once per thread)
Self::init_command_senders();
// Set logging to static clock mode for deterministic timestamps
logging_clock_set_static_mode();
logging_clock_set_static_time(start_ns.as_u64());
// Start kernel, then stop before trader startup for event-store replay
self.kernel.start();
if self.kernel.is_event_store_replay() {
self.log_pre_run();
return Ok(());
}
if self.kernel.is_event_store_replay_configured() {
anyhow::bail!("event-store replay did not start");
}
self.kernel.start_trader()?;
// Drain on_start data subscriptions so aggregators subscribe before the first data
// point, else internal aggregation drops the first tick. Trading/exec stay queued
while !data_cmd_queue_is_empty() {
drain_data_cmd_queue();
}
self.log_pre_run();
}
self.log_run();
// Skip data before start_ns
while let Some(d) = self.data_iterator.peek() {
if d.ts_init() >= start_ns {
break;View on GitHub (pinned to 18893faf8b)
Solutions
- Verify the event-store replay configuration (catalog path, stream/session ids) points to existing replayable data
- Check kernel event-replay setup so replay is actually initiated before trading starts
- Confirm data exists in the event store for the requested time range
Example fix
// before
let engine = get_backtest_engine_with_event_replay("/wrong/path");
engine.run(None, None, None, false)?;
// after
let engine = get_backtest_engine_with_event_replay("/correct/catalog"); // contains replay data
engine.run(None, None, None, false)?; Defensive patterns
Strategy: try-catch
Try / catch
match engine.run(...) {
Err(e) if e.to_string() == "event-store replay did not start" => {
eprintln!("check event-store replay config and data availability: {e}");
}
other => other?,
} Prevention
- Verify the event store contains data for the replay range before running
- Test replay configuration with a small known dataset first
- Confirm replay initiation happens before trading starts in your setup path
When it happens
Trigger: Event-store replay configured (e.g. via kernel/catalog event replay settings) but the replay did not begin: misconfigured replay source, empty/unreachable event store, or replay not initiated before reaching this check.
Common situations: Pointing replay at a non-existent or empty event-store stream; wrong session/storage configuration; streaming flags suppressing replay start.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- catalog marker join plan failed for {data_cls}: {error}
- catalog marker join load failed for {data_cls}: {error}
- Cannot handle command: {command:?}
- Latency model should be initialized
- Execution client should be initialized
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/b821e27e39ee0b96.
Report an issue: GitHub.