While trying to install logstash plugin, I was getting below error:
$ /work/logstash/logstash-5.5.2/bin/logstash-plugin install logstash-input-cloudwatch WARNING: A maven settings file already exist at ~/.m2/settings.xml, please review the content to make sure it include your proxies configuration. Validating logstash-input-cloudwatch Installing logstash-input-cloudwatch Error Bundler::InstallError, retrying 1/10 An error occurred while installing logstash-core (5.5.2), and Bundler cannot continue. Make sure that `gem install logstash-core -v '5.5.2'` succeeds before bundling. Error Bundler::InstallError, retrying 2/10 An error occurred while installing logstash-core (5.5.2), and Bundler cannot continue. Make sure that `gem install logstash-core -v '5.5.2'` succeeds before bundling.Here are the things I did to make it work:
- Created maven ~/.m2/settings.xml file
<?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <proxies> <proxy> <id>proxy.server.0</id> <active>true</active> <protocol>http</protocol> <host>proxy.server</host> <port>80</port> </proxy> </proxies> </settings>
- Set environment variables:
export JAVA_HOME="/work/elasticsearch/jre1.8.0_162/" export PATH=$JAVA_HOME/bin:$PATH export http_proxy=http://proxy.server:80 export https_proxy=http://proxy.server:80 export NO_PROXY="127.0*,[::1],localhost,.local" export no_proxy=$NO_PROXY
- Installed the plugin:
/usr/bin/sudo -u root -H /bin/env https_proxy=http://proxy.server:80 HTTPS_PROXY=http://proxy.server:80 JRUBY_OPTS="-J-Dhttp.proxyHost=proxy.server -J-Dhttp.proxyPort=80" DEBUG=1 /work/logstash/logstash-5.5.2/bin/logstash-plugin install logstash-input-cloudwatch
Comments