5

前段时间我使用 ES 0.20.1 构建了自己的 ES 插件。工作得很好。今天,我想我会回到那个项目并首先尝试在最新版本(0.20.6)上重新部署它,就像我之前从 0.19.8 到 0.20.1 所做的那样。

所以我更新了依赖项以使用 0.20.6 库,运行我的测试(全部通过)并构建了插件。(我正在使用 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

那个可以工作......但现在它给我抛出了以下错误:

-> Installing MyPlugin...
Failed to install MyPlugin, reason: no protocol: /path/to/foler/containing/zipfile

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

sudo /usr/share/elasticsearch/bin/plugin -url file:///path/to/foler/containing/zipfile -install elasticsearch-MyPlugin-0.20.6

这是输出:

-> 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]

只是为了彻底,我有es-plugin.properties指向正确类的文件。

我猜我使用的名称和/或我安装插件的方式有问题,但我不知道出了什么问题。

4

1 回答 1

11

在盲目尝试多种解决方案后成功了...

sudo /usr/share/elasticsearch/bin/plugin -url file:///path/to/the/actual/elasticsearch-MyPlugin-0.20.6.zip -install MyPlugin
于 2013-04-03T16:10:52.247 回答