无法安装我自己的ElasticSearch插件

Cry*_*ark 5 java plugins debian maven elasticsearch

我不久前使用ES 0.20.1构建了自己的ES插件.工作得很好.今天,我想我会回到那个项目并首先尝试在最新版本(0.20.6)上重新部署它,因为我之前已经从0.19.8到0.20.1.

所以我更新了依赖关系以使用0.20.6 lib,运行我的测试(全部通过)并构建了插件.(我正在使用maven)

这生成了一个名为elasticsearch-MyPlugin-0.20.6.zipwich 的文件,其中包含jarmyplugin-0.0.1-SNAPSHOT-jar-with-dependencies.jar

然后像往常一样使用我的插件部署

sudo /usr/share/elasticsearch/bin/plugin -url /path/to/foler/containing/zipfile -install MyPlugin
Run Code Online (Sandbox Code Playgroud)

这用起来工作......但它现在抛出以下错误:

-> Installing MyPlugin...
Failed to install MyPlugin, reason: no protocol: /path/to/foler/containing/zipfile
Run Code Online (Sandbox Code Playgroud)

所以我回到了ES文档中关于安装插件的内容.

sudo /usr/share/elasticsearch/bin/plugin -url file:///path/to/foler/containing/zipfile -install elasticsearch-MyPlugin-0.20.6
Run Code Online (Sandbox Code Playgroud)

这是输出:

-> Installing elasticsearch-MyPlugin-0.20.6...
Trying file:/path/to/foler/containing/zipfile...
Downloading .DONE
failed to extract plugin [/usr/share/elasticsearch/plugins/elasticsearch-MyPlugin-0.20.6.zip]: ZipException[error in opening zip file]
Run Code Online (Sandbox Code Playgroud)

为了彻底,我有一个es-plugin.properties指向正确班级的文件.

我正在使用我使用的名称和/或我安装插件的方式存在问题,但我无法弄清楚什么是错的.

Cry*_*ark 9

盲目地尝试多种解决方案后对它进行了保护......

sudo /usr/share/elasticsearch/bin/plugin -url file:///path/to/the/actual/elasticsearch-MyPlugin-0.20.6.zip -install MyPlugin
Run Code Online (Sandbox Code Playgroud)