# Logstash 6.2.1 - unable to install unbundled filter plugin

**URL:** <https://discuss.elastic.co/t/logstash-6-2-1-unable-to-install-unbundled-filter-plugin/119292>\
**Category:** Logstash\
**Created:** [February 9, 2018, 7:07pm UTC](https://discuss.elastic.co/t/logstash-6-2-1-unable-to-install-unbundled-filter-plugin/119292 "2018-02-09T19:07:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ld\_pvl](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@ld\_pvl](https://discuss.elastic.co/u/ld_pvl)\
**Post date:** [February 9, 2018, 7:07pm UTC](https://discuss.elastic.co/t/logstash-6-2-1-unable-to-install-unbundled-filter-plugin/119292/1 "2018-02-09T19:07:52Z")

</div>

Hi Team,

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:

```
bin/logstash-plugin install --local --no-verify file:///path/to/the.gem

```

However it throws me this:

```
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

```

What is the best way to install a gem locally?

Thanks a lot for your help,

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 9, 2018, 7:11pm UTC](https://discuss.elastic.co/t/logstash-6-2-1-unable-to-install-unbundled-filter-plugin/119292/2 "2018-02-09T19:11:40Z")

</div>

You can create a zip format plugin pack on a server that has connectivity, then copy it to an offline server. Documentation is [here](https://www.elastic.co/guide/en/logstash/current/offline-plugins.html). For me that meant building the pack at home and sending it to myself at work ☹

---

<div class="post-metadata">

**Author:** ![ld\_pvl](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@ld\_pvl](https://discuss.elastic.co/u/ld_pvl)\
**Post date:** [February 9, 2018, 7:47pm UTC](https://discuss.elastic.co/t/logstash-6-2-1-unable-to-install-unbundled-filter-plugin/119292/3 "2018-02-09T19:47:43Z")

</div>

Thanks for the tip. While checking out your suggestion I stumbled upon this doc: [https://www.elastic.co/guide/en/logstash/current/working-with-plugins.html#installing-local-plugins](https://www.elastic.co/guide/en/logstash/current/working-with-plugins.html#installing-local-plugins)

Apparently gem files can be used - but I should drop the `file:///` bit - will try and report back.

---

<div class="post-metadata">

**Author:** ![ld\_pvl](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@ld\_pvl](https://discuss.elastic.co/u/ld_pvl)\
**Post date:** [February 9, 2018, 9:10pm UTC](https://discuss.elastic.co/t/logstash-6-2-1-unable-to-install-unbundled-filter-plugin/119292/4 "2018-02-09T21:10:18Z")

</div>

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:

```
perl -pi -e "s/https:\/\/rubygems.org/http:\/\/rubygems.org/g" /path/to/logstash/Gemfile
echo 'gem "logstash-filter-age"' >> /path/to/logstash/Gemfile
/path/to/logstash/bin/logstash-plugin install --no-verify
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 9, 2018, 9:10pm UTC](https://discuss.elastic.co/t/logstash-6-2-1-unable-to-install-unbundled-filter-plugin/119292/5 "2018-03-09T21:10:34Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
