Installing plugins via proxy doesn't work (anymore)

Hi,

so I've been at this for over an hour now and I'm getting really desperate. I want to install the "license" plugin in my ES (for Kibana Reporting), but I'm unable to install the plugin through the corporate proxy. I already have installed the "head" plugin some months ago with the following:

/usr/share/elasticsearch/bin/plugin -DproxyPort=3128 -DproxyHost=http://****** -install mobz/elasticsearch-head

Back then it worked fine. Now I can't seem to use the proxy anymore. I've tried all of the following, but neither of these works:

/usr/share/elasticsearch/bin/plugin -Dhttps.proxyPort=3128 -Dhttps.proxyHost=http://****** install license
/usr/share/elasticsearch/bin/plugin -Dhttp.proxyPort=3128 -Dhttp.proxyHost=http://****** install license
/usr/share/elasticsearch/bin/plugin -DproxyPort=3128 -DproxyHost=http://****** install license
/usr/share/elasticsearch/bin/plugin -Dproxy_port=3128 -Dproxy_host=http://****** install license

The result is always a SocketTimeout:

-> Installing license...
Trying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/license/2.4.1/license-2.4.1.zip ...
Failed: SocketTimeoutException[connect timed out]
ERROR: failed to download out of all possible locations..., use --verbose to get detailed information

Downloading the plugin via wget (on the same host with the same proxy) works:

https_proxy=http://******:3128 wget "https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/license/2.4.1/license-2.4.1.zip"
--2016-09-30 09:55:59--  https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/license/2.4.1/license-2.4.1.zip
Resolving ****** (******)... ******
Connecting to ****** (******)|******|:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 103393 (101K) [application/zip]
Saving to: `license-2.4.1.zip'

100%[================================>] 103,393      538K/s   in 0.2s    

2016-09-30 09:56:00 (538 KB/s) - `license-2.4.1.zip' saved [103393/103393]

Does anybody have an idea what I'm missing? (Elasticsearch version: 2.4.1)

Can you try:

/usr/share/elasticsearch/bin/plugin install license -DproxyPort=3128 -DproxyHost=http://******

Hi!

Tried that too, didn't work either. :frowning:

Can you try with the --verbose option?

Hi!

The verbose option doesnn't say much, only: "Failed: SocketTimeoutException[connect timed out]". Which would basically mean that it's some kind of network error. But since it works with wget I'd guess that the ES plugin-script doesn't respect the proxy or can't use it properly.

Try a manual install. This worked for me when I was messing around with Elastic.

From this discussion on StackOverflow.

You can also download plugin zip file to a temporary location and then install it by specifying path to it using --url parameter:

bin/plugin --install knapsack --url file:///Full/Path/To/elasticsearch-knapsack-2.1.2.zip
See Plugins documentation for more information.

Good luck

That's my concern actually. I mean that if it's documented and not working then it's a bug.
May I suggest that you open an issue and link to this discussion?

Ah, I completely forgot this one. So it seems that it was some error on our network. I tried it again and it works. Sorry for the confusion.

It wasn't a network error after all. The problem still persists.

I've opened a bugticket: https://github.com/elastic/elasticsearch/issues/21824