This post is older than a year. Consider some information might not be accurate anymore.
Used: elasticsearch v2.2
This post demonstrates how to install elasticsearch or kibana plugins behind a proxy. There are several possibilities to achieve an online or offline installation. Following example installs the delete-by-query plugin for elasticsearch v 2.2. It is a great improvement to the previous buggy and non performant implementation. elastic has remove it from the elasticsearch core.
Usually you would install it online the regular way
vinh@cinhtau:/opt/elasticsearch> bin/plugin install delete-by-query
Lets see what the plugin answers
vinh@cinhtau:/opt/elasticsearch> bin/plugin install delete-by-query --verbose
-> Installing delete-by-query...
Trying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/delete-by-query/2.2.0/delete-by-query-2.2.0.zip ...
Failed: ConnectException[Connection refused]
ERROR: failed to download out of all possible locations..., use --verbose to get detailed information
To see the option for install
vinh@cinhtau:/opt/elasticsearch> bin/plugin install -h
If you have to bypass a proxy you can use the Java System Properties to download it online. The installation requires a https connection.
https.proxyHost
https.proxyPort
-
https.proxyUser
(required if auth is mandatory) -
https.proxyPassword
(required if auth is mandatory)
Example for Elasticsearch on Windows
C:\TEMP\elasticsearch-2.2.0>bin\plugin.bat -Dhttps.proxyPort=8080 -Dhttps.proxyHost=proxy.cinhtau.net -Dhttps.proxyUser=vinh -Dhttps.proxyPassword=secret install delete-by-query
-> Installing delete-by-query...
Trying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/delete-by-query/2.2.0/delete-by-query-2.2.0.zip ...
Downloading ..DONE
Verifying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/delete-by-query/2.2.0/delete-by-query-2.2.0.zip checksums if available ...
Downloading .DONE
Installed delete-by-query into C:\TEMP\elasticsearch-2.2.0\plugins\delete-by-query
If you have no proxy auth or access to can also perform an offline installation. Just download the zip file from the given url and install it with
vinh@cinhtau:/opt/elasticsearch> bin/plugin install file:///tmp/delete-by-query-2.2.0.zip
-> Installing from file:/tmp/delete-by-query-2.2.0.zip...
Trying file:/tmp/delete-by-query-2.2.0.zip ...
Downloading .DONE
Verifying file:/tmp/delete-by-query-2.2.0.zip checksums if available ...
NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)
Installed delete-by-query into /var/opt/RiskShield/elasticsearch/plugins/delete-by-query
Remember that the CLI API is slightly different in elasticsearch v1.x.