{"record":{"id":"12e5e51e3fa16ce6","repo":"influxdata/influxdb","slug":"connection-error","errorCode":null,"errorMessage":"Connection error: {}{}","messagePattern":"Connection error: (.+?)(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/client_util/src/connection.rs","lineNumber":79,"sourceCode":"\n    /// Return a reference to the base uri of the IOx http API endpoint\n    pub fn uri(&self) -> &Uri {\n        &self.uri\n    }\n}\n\n/// The default User-Agent header sent by the HTTP client.\npub const USER_AGENT: &str = concat!(env!(\"CARGO_PKG_NAME\"), \"/\", env!(\"CARGO_PKG_VERSION\"));\n/// The default connection timeout\npub const DEFAULT_CONNECT_TIMEOUT: Duration = Duration::from_secs(1);\n/// The default request timeout\npub const DEFAULT_TIMEOUT: Duration = Duration::from_secs(30);\n\n/// Errors returned by the ConnectionBuilder\n#[derive(Debug, Error)]\npub enum Error {\n    /// Server returned an invalid argument error\n    #[error(\"Connection error: {}{}\", source, details)]\n    TransportError {\n        /// underlying [`tonic::transport::Error`]\n        source: tonic::transport::Error,\n        /// stringified version of the tonic error's source\n        details: String,\n    },\n\n    /// Client received an unexpected error from the server\n    #[error(\"Invalid URI: {}\", .0)]\n    InvalidUri(#[from] http::Error),\n}\n\n// Custom impl to include underlying source (not included in tonic\n// transport error)\nimpl From<tonic::transport::Error> for Error {\n    fn from(source: tonic::transport::Error) -> Self {\n        use std::error::Error;\n        let details = source","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/core/client_util/src/connection.rs#L61-L97","documentation":"ProcessingEngineError::PackageInstallationDisabled transparently forwards the message of a PluginEnvironmentError indicating that installing Python packages is not permitted in the current configuration. It is produced by the From<PluginEnvironmentError> conversion that discriminates 'install attempted while disabled' from general install failures. It exists so operators see the exact underlying reason verbatim.","triggerScenarios":"Enabling/creating a Python plugin trigger that requires packages while the server is configured to disallow package installation (e.g. package_manager disabled in config or the environment setup function returns that PluginEnvironmentError).","commonSituations":"Production deployments with package installs turned off for security; server started with a flag like --plugin-env or package-manager disabled; operator forgot to enable package management or pre-provision packages.","solutions":["Enable package installation in the server configuration (the relevant plugin-env/package-manager option) if policy allows.","Pre-install the required packages into the plugin virtual environment so no install is needed.","Remove package requirements from the plugin if the runtime should be dependency-free.","Bake dependencies into the container image and restart."],"exampleFix":"// before\ninfluxdb3 serve ...  # package installs disabled, plugin requires 'requests'\n// after\ninfluxdb3 serve ... --plugin-env-enable-package-install  # or pre-install requests into the venv","handlingStrategy":"validation","validationCode":"# before enabling a trigger that needs packages\nif !package_install_enabled(config) && plugin_has_requirements(plugin) {\n    echo \"enable package installation or pre-install deps\"\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(ProcessingEngineError::PackageInstallationDisabled(e)) => error!(\"installs disabled: {e}; enable package manager or pre-install\"),\n    Ok(v) => v,\n}","preventionTips":["Match server config to plugin needs: enable package install or ship dependency-free plugins.","Pre-install packages into the plugin venv during image build.","Document the security policy that disables installs for operators."],"tags":["python","plugin-environment","package-install","configuration"],"backgroundTag":"feature-not-enabled","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}