influxdata/influxdb · error · PluginEnvironmentError
External call failed
Error message
External call failed: {0} What it means
PluginEnvironmentError::InstallationFailed wraps a std::io::Error (via #[from]) raised when an external process call (package manager or shell command) made by the plugin environment manager fails. The message carries the io::Error details (e.g. command spawn failure or non-zero-exit representation).
Solutions
- Inspect the wrapped std::io::Error in the message for the failing command and errno
- Ensure the binaries invoked (python3, package manager) exist and are executable by the influxdb3 user
- Run with sufficient filesystem permissions (writable plugin env directory, exec on /tmp)
- Retry the plugin environment setup after fixing the environment; check OS-level limits
Example fix
// before
// InvocationFailed(io::Error): No such file or directory (os error 2)
// after: ensure the binary exists before setup
if which("python3").is_err() {
install_python3()?;
}
env_manager.setup(plugin).await?; Defensive patterns
Strategy: try-catch
Validate before calling
# pre-check the external command before env setup
test -x "$(command -v python3)" || { echo 'python3 not executable'; exit 1; }
test -w /var/lib/influxdb3/plugins || { echo 'plugin dir not writable'; exit 1; } Type guard
fn is_installation_failed(e: &PluginEnvironmentError) -> Option<&std::io::Error> {
if let PluginEnvironmentError::InstallationFailed(io) = e { Some(io) } else { None }
} Try / catch
match env_manager.setup(plugin).await {
Err(PluginEnvironmentError::InstallationFailed(io)) => {
eprintln!("external call failed: {io}; check binaries and permissions");
Err(io.into())
}
other => other,
} Prevention
- Verify all external binaries exist and are executable before setup
- Grant the influxdb3 user write access to the plugin env directory
- Ensure /tmp is executable in containers
- Check ulimits and SELinux/AppArmor policies
When it happens
Trigger: Plugin environment setup runs Command::new(...) for venv creation or package installation and the process fails to spawn (binary missing, permission denied) or the call returns an io error (broken pipe, interrupted).
Common situations: python3 not executable by the influxdb3 user; EACCES on package manager; network-less install commands failing at the OS layer; container lacks /tmp exec permissions breaking venv creation.
Related errors
- Failed to list packages
- Package installation has been disabled. Contact your…
- Package manager not available
- Plugin environment management is disabled
- Virtual environment error
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/9dc8f79217c9d60e.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_processing_engine/src/environment.rs:17
use crate::environment::PluginEnvironmentError::PluginEnvironmentDisabled;
use crate::virtualenv::{VenvError, find_python, initialize_venv};
use observability_deps::tracing::debug;
use pyo3::prelude::PyAnyMethods;
use pyo3::{PyResult, Python};
use std::fmt::Debug;
use std::path::{Path, PathBuf};
use std::process::Command;
use std::sync::{Arc, OnceLock};
use thiserror::Error;
#[derive(Error, Debug)]
pub enum PluginEnvironmentError {
#[error("Package manager not available: {0}")]
PackageManagerNotFound(String),
#[error("External call failed: {0}")]
InstallationFailed(#[from] std::io::Error),
#[error("Plugin environment management is disabled")]
PluginEnvironmentDisabled,
#[error("Virtual environment error: {0}")]
VenvError(#[from] VenvError),
#[error("Failed to list packages: {0}")]
PackageListFailed(String),
#[error(
"Package installation has been disabled. Contact your administrator for more information."
)]
PackageInstallationDisabled,
}
pub trait PythonEnvironmentManager: Debug + Send + Sync + 'static {
fn init_pyenv(View on GitHub (pinned to 06200ef96b)