influxdata/influxdb · error · Error
database not found
Error message
database not found {db_name:?} What it means
Indicates a write or operation referenced a database that does not exist in this server's catalog. The `db_name` field names the missing database. InfluxDB 3 generally requires databases to be created (explicitly or via configured auto-creation behavior) before writes succeed.
Solutions
- Check existing databases (e.g. via the catalog/`show databases` equivalent) and correct the name
- Create the database explicitly before writing
- Verify the client is pointed at the intended server/environment
Example fix
// before
client.write("metrics-prod", lp)?; // typo
// after
let db = "metrics-prod";
if !database_exists(db)? {
create_database(db)?;
}
client.write(db, lp)?; Defensive patterns
Strategy: validation
Validate before calling
// before writing
if !databases().await?.iter().any(|d| d == db_name) {
create_database(db_name).await?;
} Prevention
- Centralize database names in config, not hardcoded literals in clients
- Add a startup check that all target databases exist
- Alert on DatabaseNotFound writes to catch client misconfiguration early
- Watch for database deletions by other operators
When it happens
Trigger: Calling the write API (e.g. write_lp / line-protocol write) with a database name that has never been created, was deleted (including soft-deleted), or is misspelled relative to the catalog.
Common situations: Typo in the bucket/database name in a Telegraf or client config; pointing a client at the wrong influxdb3 instance/environment; the database was deleted by another operator; switching from InfluxDB 1.x bucket names.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- tried accessing database that does not exist
- {0}
- Database not found
- database not found
- Database not found
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/6c51e1d18f06d337.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_write/src/write_buffer/mod.rs:101
#[error("catalog update error: {0}")]
CatalogUpdateError(#[from] CatalogError),
#[error("error from persister: {0}")]
PersisterError(#[from] PersisterError),
#[error("corrupt load state: {0}")]
CorruptLoadState(String),
#[error("database name error: {0}")]
DatabaseNameError(#[from] DatabaseNameError),
#[error("error from table buffer: {0}")]
TableBufferError(#[from] table_buffer::Error),
#[error("error in last cache: {0}")]
LastCacheError(#[from] last_cache::Error),
#[error("database not found {db_name:?}")]
DatabaseNotFound { db_name: String },
#[error("table not found {table_name:?} in db {db_name:?}")]
TableNotFound { db_name: String, table_name: String },
#[error("tried accessing database that does not exist")]
DbDoesNotExist,
#[error("tried creating database named '{0}' that already exists")]
DatabaseExists(String),
#[error("cannot write to soft-deleted database '{0}' - it is marked for deletion")]
DatabaseDeleted(String),
#[error("tried accessing table that do not exist")]
TableDoesNotExist,
#[error("table '{db_name}.{table_name}' already exists")]View on GitHub (pinned to 06200ef96b)