尝试安装插件时连接被拒绝错误

时间:2017-02-10 16:30:52

标签: ruby elasticsearch logstash

我正在尝试安装logstash-input-jmx插件,但我一直在

ERROR: Something went wrong when installing , message: Connection refused - Connection refused

我试图在运行之前设置代理但没有运气:

export http_proxy=http://proxy.com:8099
export https_proxy=http://proxy.com:8099
./logstash-plugin install logstash-input-jmx

我已编辑logstash-plugin文件以包含代理,如下所示:

#!/bin/sh

unset CDPATH
. "$(cd `dirname $0`/..; pwd)/bin/logstash.lib.sh"
setup

# bin/logstash-plugin is a short lived ruby script thus we can use aggressive "faster starting JRuby options"
# see https://github.com/jruby/jruby/wiki/Improving-startup-time
export JRUBY_OPTS="$JRUBY_OPTS -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify -X-C -Xcompile.invokedynamic=false"
export http_proxy=http://proxy.com:8099
export https_proxy=http://proxy.com:8099
ruby_exec "${LOGSTASH_HOME}/lib/pluginmanager/main.rb" "$@"

但得到了同样的错误

我甚至试图关注这个github页面:https://github.com/logstash-plugins/logstash-input-jmx

但是当我到达bin/logstash-plugin install --no-verify时......我仍然遇到同样的错误......

1 个答案:

答案 0 :(得分:0)

我可以通过在代理中添加LS_JAVA_OPTS

来解决此问题
LS_JAVA_OPTS='-Dhttp.useProxy=true -Dhttp.proxyHost=http://proxy.com -Dhttp.proxyPort=8099 -Dhttps.proxyHost=http://proxy.com -Dhttps.proxyPort=8099' ./logstash-plugin install logstash-input-jmx