Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install my own ElasticSearch plugin

I've built my own ES plugin some time ago using ES 0.20.1. Worked fine. Today, i thought i would get back on that project and first try to redeploy it on the latest version (0.20.6) as i already did earlier getting from 0.19.8 to 0.20.1.

So i updated the dependency to use the 0.20.6 lib, runned my tests (all passed) and built the plugin. (i'm using maven)

That generated a file named elasticsearch-MyPlugin-0.20.6.zip wich contains the jar myplugin-0.0.1-SNAPSHOT-jar-with-dependencies.jar

Then as usual i deploy my plugin using

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

That use to work... but it now throws me the following error:

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

So i fell back to what the ES documentation says about installing plugin.

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

Here's the output:

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

Just to be thorough, i have the file es-plugin.properties which points to the right class.

I'm gessing there's a problem in the names i use and/or the way i install the plugin but i can't get my hands on what's wrong.

like image 606
Crystark Avatar asked Apr 03 '13 15:04

Crystark


1 Answers

Nailed it after blindly trying multiple solutions...

sudo /usr/share/elasticsearch/bin/plugin -url file:///path/to/the/actual/elasticsearch-MyPlugin-0.20.6.zip -install MyPlugin
like image 140
Crystark Avatar answered Sep 29 '22 15:09

Crystark