databendlabs/databend · error
Log history is enabled but storage_params is not set
Error message
Log history is enabled but storage_params is not set
What it means
The metasrv binary's logging initialization requires that when log history is enabled (`log.history.on = true`), a storage backend must be configured via `log.history.storage_params`. If logging is on but storage_params is missing, init_logging_system aborts startup with this anyhow error before any nodes can run.
Solutions
- Set storage_params under [log.history] in the metasrv config (e.g. type = "fs", data_dir) or an S3/GCS endpoint
- Set log.history.on = false if history logging is not needed
- Check the effective config file rendered at startup to confirm the section exists
Example fix
// before [log.history] on = true // after [log.history] on = true [log.history.storage_params] type = "fs" root = "./.databend/meta_logs"
Defensive patterns
Strategy: validation
Validate before calling
if log_config.history.on && log_config.history.storage_params.is_none() {
return Err(anyhow!("Log history is enabled but storage_params is not set"));
} Try / catch
match result {
Ok(v) => v,
Err(e) => { log::error!("log history storage config missing: {}", e); std::process::exit(1); }
} Prevention
- Keep [log.history] on and storage_params adjacent in the same config template
- Lint metasrv config files for required sections before deployment
- Disable log.history.on when storage_params is intentionally omitted
When it happens
Trigger: Running databend-meta with a config where [log.history] on = true but storage_params (e.g. an s3/fs operator config) is absent.
Common situations: Operators upgrading from versions where log history storage was optional; copying a config file and enabling history.on without adding storage_params; environment-based config generation that omits the storage section.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- bendsave requires bucket but it's empty in uri
- {e}
- endpoint_url is required for storage cos
- endpoint_url is required for storage oss
- Failed to push log element
AI-assisted analysis of databendlabs/databend@288d84d76e (2026-09-11).
Data as JSON: /api/errors/f5fa2b35e1e5422e.
Report an issue: GitHub.
Appendix: source
Thrown at src/meta/binaries/meta/entry.rs:447
);
let log_labels = [
("cluster_name", raft_config.cluster_name.as_str()),
("node_id", &raft_config.id.to_string()),
("cluster_id", raft_config.cluster_name.as_str()),
]
.into_iter()
.map(|(k, v)| (k.to_string(), v.to_string()))
.collect();
GlobalInstance::init_production();
GlobalLogger::init(&app_name, log_config, log_labels);
if log_config.history.on {
GlobalIORuntime::init(num_cpus::get())?;
let params = log_config.history.storage_params.as_ref().ok_or_else(|| {
anyhow::anyhow!("Log history is enabled but storage_params is not set")
})?;
let remote_log_op = init_operator(params).map_err(|e| anyhow::anyhow!(e))?;
GlobalLogger::instance().set_operator(remote_log_op).await;
}
Ok(())
}
fn pretty<T>(v: &T) -> Result<String, serde_json::Error>
where T: serde::Serialize {
serde_json::to_string_pretty(v)
}
View on GitHub (pinned to 288d84d76e)