{"record":{"id":"e1e5fb7a0dbb2f52","repo":"influxdata/influxdb","slug":"no-plugin-directory-configured","errorCode":null,"errorMessage":"No plugin directory configured","messagePattern":"No plugin directory configured","errorType":"exception","errorClass":"ProcessingEngineError","httpStatus":null,"severity":"error","filePath":"influxdb3_processing_engine/src/lib.rs","lineNumber":1062,"sourceCode":"    }\n\n    pub async fn create_plugin_file(\n        self: &Arc<Self>,\n        plugin_filename: &str,\n        content: &str,\n    ) -> Result<(), ProcessingEngineError> {\n        if self.environment_manager.plugin_dir_only {\n            return Err(ProcessingEngineError::PluginError(\n                PluginError::PluginInstallationDisabled,\n            ));\n        }\n\n        let plugin_dir = self\n            .environment_manager\n            .plugin_dir\n            .as_ref()\n            .ok_or_else(|| {\n                ProcessingEngineError::PluginError(plugins::PluginError::AnyhowError(anyhow!(\n                    \"No plugin directory configured\"\n                )))\n            })?;\n\n        let plugin_path = validate_path_within_plugin_dir(plugin_dir, plugin_filename)?;\n\n        // Create parent directories if they don't exist (for multi-file plugins)\n        if let Some(parent) = plugin_path.parent() {\n            async_fs::create_dir_all(parent).await.map_err(|e| {\n                ProcessingEngineError::PluginError(plugins::PluginError::ReadPluginError(e))\n            })?;\n        }\n\n        async_fs::write(&plugin_path, content).await.map_err(|e| {\n            ProcessingEngineError::PluginError(plugins::PluginError::ReadPluginError(e))\n        })?;\n\n        Ok(())","sourceCodeStart":1044,"sourceCodeEnd":1080,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_processing_engine/src/lib.rs#L1044-L1080","documentation":"Thrown when a ProcessingEngineManager operation needs to resolve a plugin file path but `environment_manager.plugin_dir` is None, meaning no plugin directory was configured at startup. The manager cannot locate or validate plugin files without this directory. It wraps a PluginError in ProcessingEngineError.","triggerScenarios":"Calling plugin-management APIs such as loading/writing plugin files (via validate_path_within_plugin_dir) when the server was started without the `--plugin-dir` option or the plugin_dir field was never set on the EnvironmentManager.","commonSituations":"Starting influxdb3 without the plugin directory flag but then attempting to manage plugins via the Processing Engine HTTP API; Docker images missing the volume mounted to the plugin dir; config file omitting the plugin_dir key.","solutions":["Start the server with the plugin directory configured (e.g. `influxdb3 serve --plugin-dir /path/to/plugins`).","If using a config file/environment, set the plugin_dir field so EnvironmentManager.plugin_dir is Some.","Check the Processing Engine HTTP API is only called after the plugin dir is configured; gate calls at startup.","In Docker/K8s, mount the plugins volume and point the plugin-dir flag at the mount."],"exampleFix":"// before: no plugin dir on startup\ninfluxdb3 serve --node-id node1\n// after\ninfluxdb3 serve --node-id node1 --plugin-dir /var/lib/influxdb3/plugins","handlingStrategy":"validation","validationCode":"if (!serverConfig.pluginDir) {\n  throw new Error('Start server with --plugin-dir before calling plugin APIs');\n}","typeGuard":"const hasPluginDir = (env) => env && typeof env.pluginDir === 'string' && env.pluginDir.length > 0;","tryCatchPattern":null,"preventionTips":["Always pass --plugin-dir on serve in every environment (dev, CI, prod).","Add a startup health check that asserts plugin_dir is configured.","Document the flag in deployment templates (Dockerfile/compose/helm)."],"tags":["processing-engine","configuration","plugin-directory"],"backgroundTag":"missing-required-config-field","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"}