influxdata/influxdb · error · Error

write not allowed on internal database

Error message

write not allowed on internal database

What it means

Returned when a write targets one of InfluxDB's reserved internal system databases. Internal databases back system/runtime data and are not writable by users, so all ingest attempts against them are rejected.

Solutions

  1. Write to a user-created database instead of the internal one
  2. Filter out internal/system database names in automation that iterates databases
  3. Fix the database name in the writer configuration
  4. Check version docs — behavior/permissions of internal dbs may differ across versions

Example fix

// before
client.write("_internal", lines)?;  // internal db
// after
client.write("telemetry", lines)?;
Defensive patterns

Strategy: validation

Validate before calling

const INTERNAL_DBS: &[&str] = &["_internal", "system"]; // per version docs
if INTERNAL_DBS.contains(&db_name.as_str()) {
    return Err(format!("{db_name} is internal; not writable"));
}

Type guard

fn is_internal_db_write(err: &WriteBufferError) -> bool {
    matches!(err, WriteBufferError::InternalDbWriteNotAllowed)
}

Try / catch

match buffer.write(db_name, lines) {
    Err(WriteBufferError::InternalDbWriteNotAllowed) => {
        eprintln!("{db_name} is a reserved internal database");
    }
    other => other?,
}

Prevention

When it happens

Trigger: Writing line protocol with a database name that collides with a reserved internal database name (e.g. system-managed dbs); misconfigured writer with db name like '_internal' or similar.

Common situations: Config copied from setups where an internal/system db was writable in older versions; scripts enumerating all databases and writing to each including internal ones.

Understand the failure class

Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.

Related errors


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/ab1def30d376c9a7. Report an issue: GitHub.

Appendix: source

Thrown at influxdb3_write/src/write_buffer/mod.rs:146

    #[error(
        "updating catalog on delete of last cache failed, you will need to delete the cache \
        again on server restart"
    )]
    DeleteLastCache(#[source] CatalogError),

    #[error("error from wal: {0}")]
    WalError(#[from] influxdb3_wal::Error),

    #[error("error in distinct value cache: {0}")]
    DistinctCacheError(#[from] distinct_cache::ProviderError),

    #[error("cannot write to a compactor-only server")]
    NoWriteInCompactorOnly,

    #[error("error: {0}")]
    AnyhowError(#[from] anyhow::Error),

    #[error("write not allowed on internal database")]
    InternalDbWriteNotAllowed,
}

pub type Result<T, E = Error> = std::result::Result<T, E>;

#[derive(Debug)]
pub struct WriteRequest<'a> {
    pub db_name: DatabaseName,
    pub line_protocol: &'a str,
    pub default_time: u64,
}

struct WriteLpInner<'a> {
    db_name: DatabaseName,
    lp: &'a str,
    ingest_time: Time,
    accept_partial: bool,
    precision: Precision,

View on GitHub (pinned to 06200ef96b)