influxdata/influxdb · error · CatalogError
Cannot delete running plugin
Error message
Cannot delete running plugin {}. Disable it first or use --force. What it means
The requested plugin delete targets a Processing Engine trigger plugin that is currently running (enabled and executing). The catalog refuses to delete it in order to avoid killing live execution, and tells the user to disable it first or pass --force.
Solutions
- Disable the trigger first (DISABLE TRIGGER or the disable API), then delete the plugin.
- If you are sure, delete with the --force flag to remove the running plugin anyway.
- List triggers in the database to confirm which ones reference the plugin before deleting.
Example fix
// before influxdb3 package delete my_plugin // after disable trigger first, then: influxdb3 package delete my_plugin --force
Defensive patterns
Strategy: validation
Validate before calling
// Only delete when the trigger is not running
const trigger = await client.getTrigger(db, name);
if (trigger && trigger.state === 'Running') {
await client.disableTrigger(db, name);
}
await client.deletePlugin(db, name); Type guard
function isRunning(trigger) {
return trigger != null && trigger.state === 'Running';
} Try / catch
try {
await deletePlugin(db, name);
} catch (e) {
if (String(e).includes('Cannot delete running plugin')) {
await disableTrigger(db, name);
await deletePlugin(db, name);
} else throw e;
} Prevention
- Always disable triggers before deleting their plugins
- Encode the disable-then-delete order into teardown scripts
- Use --force only in explicit, reviewed maintenance windows
When it happens
Trigger: Calling the plugin/trigger delete API for a trigger whose state is Running, without first disabling it and without the force flag set.
Common situations: Cleaning up old plugins while their triggers are still scheduled; automation scripts that delete plugins without checking trigger state; operators forgetting the two-step disable-then-delete workflow.
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
- Cannot delete plugin
- {0}
- Cannot overwrite Processing Engine Trigger
- failed to parse trigger from
- invalid database name
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/a03392c51c466dc5.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_catalog/src/error.rs:223
},
#[error("catalog subscription error: {0}")]
Subscription(#[from] SubscriptionError),
#[error(transparent)]
Other(#[from] anyhow::Error),
#[error(
"Cannot overwrite Processing Engine Trigger {} in Database {}",
trigger_name,
database_name
)]
ProcessingEngineTriggerExists {
database_name: String,
trigger_name: String,
},
#[error(
"Cannot delete running plugin {}. Disable it first or use --force.",
trigger_name
)]
ProcessingEngineTriggerRunning { trigger_name: String },
#[error(
"Cannot delete plugin {} in database {} because it is used by trigger {}",
plugin_name,
database_name,
trigger_name
)]
ProcessingEnginePluginInUse {
database_name: String,
plugin_name: String,
trigger_name: String,
},
#[error(View on GitHub (pinned to 06200ef96b)