{"record":{"id":"58129b8cf0f11e66","repo":"elastic/elasticsearch","slug":"78-58129b","errorCode":"78","errorMessage":"this distribution of Elasticsearch contains X-Pack by default","messagePattern":"this distribution of Elasticsearch contains X-Pack by default","errorType":"exception","errorClass":"UserException","httpStatus":null,"severity":"error","filePath":"distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/InstallPluginAction.java","lineNumber":227,"sourceCode":"            throw new UserException(ExitCodes.USAGE, \"at least one plugin id is required\");\n        }\n\n        final Set<String> uniquePluginIds = new HashSet<>();\n        for (final InstallablePlugin plugin : plugins) {\n            if (uniquePluginIds.add(plugin.getId()) == false) {\n                throw new UserException(ExitCodes.USAGE, \"duplicate plugin id [\" + plugin.getId() + \"]\");\n            }\n        }\n\n        final String logPrefix = terminal.isHeadless() ? \"\" : \"-> \";\n\n        final Map<String, List<Path>> deleteOnFailures = new LinkedHashMap<>();\n        for (final InstallablePlugin plugin : plugins) {\n            final String pluginId = plugin.getId();\n            terminal.println(logPrefix + \"Installing \" + pluginId);\n            try {\n                if (\"x-pack\".equals(pluginId)) {\n                    throw new UserException(ExitCodes.CONFIG, \"this distribution of Elasticsearch contains X-Pack by default\");\n                }\n\n                if (PLUGINS_CONVERTED_TO_MODULES.contains(pluginId)) {\n                    // This deliberately does not throw an exception in order to avoid failing automation that relies on installing this\n                    // plugin during deployment.\n                    terminal.errorPrintln(\n                        \"[\" + pluginId + \"] is no longer a plugin but instead a module packaged with this distribution of Elasticsearch\"\n                    );\n                    continue;\n                }\n\n                final List<Path> deleteOnFailure = new ArrayList<>();\n                deleteOnFailures.put(pluginId, deleteOnFailure);\n\n                final Path pluginZip = download(plugin, env.tmpDir());\n                final Path extractedZip = unzip(pluginZip, env.pluginsDir());\n                deleteOnFailure.add(extractedZip);\n                final PluginDescriptor pluginDescriptor = installPlugin(plugin, extractedZip, deleteOnFailure);","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/InstallPluginAction.java#L209-L245","documentation":"Thrown inside the per-plugin install loop when pluginId equals the literal \"x-pack\". Since X-Pack ships bundled with the default Elasticsearch distribution, attempting to install it as a separate plugin is rejected with exit code 78 (CONFIG). This is a hard stop, not a warning.","triggerScenarios":"Running `bin/elasticsearch-plugin install x-pack` on any modern distribution that already contains X-Pack; install scripts/role playbooks that still carry an `x-pack` entry from pre-7.x eras.","commonSituations":"Upgrading from ES 5.x where X-Pack was a separate download; copy-pasted provisioning code; CI baselines that haven't been refreshed.","solutions":["Remove `x-pack` from the plugin install list — it is already present in the distribution.","If you need to verify X-Pack features, query the cluster (e.g. GET _xpack) instead of installing.","Audit provisioning scripts and remove any `x-pack` references in plugin install blocks."],"exampleFix":"# before\nelasticsearch-plugin install x-pack\n# after\n# (remove the line; X-Pack is bundled)","handlingStrategy":"validation","validationCode":"List<String> requested = List.of(\"x-pack\", \"analysis-icu\");\nrequested = requested.stream().filter(id -> !\"x-pack\".equals(id)).toList();\n// proceed only with the filtered list","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Maintain a 'bundled/blocked' list (x-pack, and any module name) in provisioning code and filter it out before install.","Document in your runbook that X-Pack is bundled for any cluster >= 7.0."],"tags":["plugin-install","x-pack","config-error","elasticsearch"],"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-12T08:17:17.861Z"}