Skip to content

Provide more actionable error message when installing an offline plugin in the plugins directory #27401

@jasontedor

Description

@jasontedor

Today if you try to install a plugin from a distribution that sits inside the plugins directory, you get a non-actionable error message:

Exception in thread "main" java.lang.IllegalStateException: Could not load plugin descriptor for existing plugin [x-pack-5.6.3.zip]. Was the plugin built before 2.0?
	at org.elasticsearch.plugins.PluginsService.getPluginBundles(PluginsService.java:334)
	at org.elasticsearch.plugins.InstallPluginCommand.jarHellCheck(InstallPluginCommand.java:545)
	at org.elasticsearch.plugins.InstallPluginCommand.verify(InstallPluginCommand.java:527)
	at org.elasticsearch.plugins.InstallPluginCommand.install(InstallPluginCommand.java:570)
	at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:218)
	at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:202)
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134)
	at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:69)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134)
	at org.elasticsearch.cli.Command.main(Command.java:90)
	at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:47)

This is deliberate, we do not want anything in the plugins directory that is not a plugin, but we could provide a more actionable error message here. This behavior will be documented clearly after #27400 so this is low-priority.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions