Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing ElasticSearch plugins

I'm trying to install an ElasticSearch plugin on Ubuntu 12.04, and the documentation is not helping me. The plugin is distributed as a jar, and I've tried installing it with the plugin command without apparent success:

[13:28:38][root@pre-staging:/usr/share/elasticsearch]$ curl -I file:///usr/share/elasticsearch/plugins-no/elasticsearch-knapsack-1.0.3.jar
Content-Length: 322631
Accept-ranges: bytes
Last-Modified: Thu, 13 Dec 2012 18:47:04 GMT
[13:29:56][root@pre-staging:/usr/share/elasticsearch]$ bin/plugin -url file:///usr/share/elasticsearch/plugins-no/elasticsearch-knapsack-1.0.3.jar
[13:30:01][root@pre-staging:/usr/share/elasticsearch]$ ls plugins
[13:30:03][root@pre-staging:/usr/share/elasticsearch]$

You can see that the jar file exists, but when I install it nothing happens to the plugins directory. I've also tried manually adding the jar to the plugins directory. I have no idea whether that's supposed to work, or whether I'd see something in the elasticsearch log if I did things right, but I don't, and I don't see the behavior the plugin's documentation makes me expect I should. I've also followed the plugin's installation instructions directly, https://github.com/jprante/elasticsearch-knapsack, which don't do anything useful either (the installation can't find whatever remote files it expects to install the plugin).

So the question is - How do I install this plugin? How can I tell if it's been installed correctly?

like image 917
cbmanica Avatar asked Jan 15 '23 10:01

cbmanica


1 Answers

The plugin command doesn't do anything special, it just tries to download the zip file from different locations and extracts it to a specific subfolder under plugins. Most of the plugins used to be available directly as GitHub downloads, but since GitHub has disabled its downloads feature, there is a discussion going on about what's the best way to work around this. The plugins coming from the elasticsearch team have been moved to download.elasticsearch.org and the plugin command has been lately updated to reflect this change. Have a look at the related issue and this blogpost about it.

Anyway, if you have problems using the plugin command you can just download the zip file and extract it to a specific subfolder under plugins. After that you need to restart your elasticsearch node and you'll see in the output a list of plugins that have been found and succesfully loaded during startup. Given your explanation I guess you didn't create a knapsack (or any other name you prefer) folder under plugins. Just create it and put the jar within that folder.

like image 119
javanna Avatar answered Jan 16 '23 23:01

javanna