Logstash: Document http proxy support for installing plugins

Created on 10 Feb 2015  路  5Comments  路  Source: elastic/logstash

bin/plugin install and other commands should be able to work when using a http proxy.

We should simply document the standard way of using proxy support with RubyGems.org:

export http_proxy=http://user:password@host:port
bundler docs v1.5.0

Most helpful comment

Since Logstash uses JRuby, Java proxy settings need to be applied, either as temporary (just export) or persistent (modify bin/plugin and add it before ruby exec)

export JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=HOST -Dhttp.proxyPort=PORT"

All 5 comments

This should go into the "how-to" as well

I'm not sure if the jar-dependencies part will pick it up since it was specifically trailered to pick up the Gem.proxy settings.

It might help others: you may need to proxy both HTTP and HTTPS

export http_proxy=http://user:password@host:port
export https_proxy=http://user:password@host:port
/opt/logstash/bin/plugin install logstash-???-??

Since Logstash uses JRuby, Java proxy settings need to be applied, either as temporary (just export) or persistent (modify bin/plugin and add it before ruby exec)

export JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=HOST -Dhttp.proxyPort=PORT"

@DarkKnightCZ 's solution are very closed. But miss one setting:

JARS_SKIP='true'

https://discuss.elastic.co/t/5-1-1-plugin-installation-behind-proxy/70454/10

export JRUBY_OPTS="-J-Dhttp.proxyHost=proxy.host -J-Dhttp.proxyPort=3128"
DEBUG=1 JARS_SKIP='true' bin/logstash-plugin install logstash-filter-json_encode
Was this page helpful?
0 / 5 - 0 ratings