I am trying to install an unbundled logstash plugin, namely logstash-filter-age.
I've exported both http_proxy and https_proxy and verified that I can connect to the internet and ran this command to try to install the filter:
bin/logstash-plugin install logstash-filter-age
But it is throwing me back with this error:
Validating logstash-filter-age
Unable to download data from https://rubygems.org - SocketError: Failed to open TCP connection to rubygems.org:443 (initialize: name or service not known) (https://rubygems.org/latest_specs.4.8.gz)
ERROR: Installation aborted, verification failed for logstash-filter-age
Any ideas how to get around this problem please?
On a side note, I also tried downloading the gem and installing it manually:
ERROR: Invalid pack for: file:///path/to/the.gem, reason: Invalid format, the pack must be in zip format, message: Invalid format, the pack must be in zip format
You can create a zip format plugin pack on a server that has connectivity, then copy it to an offline server. Documentation is here. For me that meant building the pack at home and sending it to myself at work
So it does not work either but I figured out the problem is due to this:
Installing logstash-filter-age
Error Bundler::Fetcher::CertificateFailureError, retrying 1/10
Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
In the long run, I should set up my certs correctly.
Meanwhile, what I have done to overcome this problem was to modify the Gemfile within the Logstash installation dir to use http link instead and add the age filter to the bundle then force install:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.