# Installing logstash plugin inside docker container

**URL:** <https://discuss.elastic.co/t/installing-logstash-plugin-inside-docker-container/186477>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [June 19, 2019, 1:35pm UTC](https://discuss.elastic.co/t/installing-logstash-plugin-inside-docker-container/186477 "2019-06-19T13:35:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomas.heuberger](https://avatars.discourse-cdn.com/v4/letter/t/e8c25b/32.png) [@thomas.heuberger](https://discuss.elastic.co/u/thomas.heuberger)\
**Post date:** [June 19, 2019, 1:35pm UTC](https://discuss.elastic.co/t/installing-logstash-plugin-inside-docker-container/186477/1 "2019-06-19T13:35:10Z")

</div>

So, when trying to install a logstash plugin inside a docker container (using an interactive shell, or a Dockerfile or docker-compose , doesn't matter), this happens:

```
sh-4.2$ ./logstash-plugin install logstash-codec-sflow
ERROR: Something went wrong when installing logstash-codec-sflow, message: execution expired

```

It seems there is no verbose option for the plugin installer, so I have to idea what to look for.  
Also, the docker container has working internet. Any ideas?

`image: docker.elastic.co/logstash/logstash:7.1.1`

---

<div class="post-metadata">

**Author:** ![kirangavali](https://avatars.discourse-cdn.com/v4/letter/k/77aa72/32.png) [@kirangavali](https://discuss.elastic.co/u/kirangavali)\
**Post date:** [June 19, 2019, 1:38pm UTC](https://discuss.elastic.co/t/installing-logstash-plugin-inside-docker-container/186477/2 "2019-06-19T13:38:37Z")

</div>

Hi @thomas.heuberger

In Docker File can you please add the below line according to OS.

For CentOS/RHEL:

`RUN yum update`

For Ubuntu:

`RUN apt-get update`

Please try this , may this will work.

Thanks ,  
Kiran

---

<div class="post-metadata">

**Author:** ![thomas.heuberger](https://avatars.discourse-cdn.com/v4/letter/t/e8c25b/32.png) [@thomas.heuberger](https://discuss.elastic.co/u/thomas.heuberger)\
**Post date:** [June 19, 2019, 1:46pm UTC](https://discuss.elastic.co/t/installing-logstash-plugin-inside-docker-container/186477/3 "2019-06-19T13:46:51Z")

</div>

Never mind. The problem is that the logstash plugin installer ignores the proxy export, and does not echo any error messages.

> [@5.1.1: Plugin installation behind Proxy](https://discuss.elastic.co/t/5-1-1-plugin-installation-behind-proxy/70454/12):
>
> Can I have a definitive statement on the fix for this please? I've upgraded to 5.2.0 and i still cannot install plugins. And, the above workaround fails too: # bin/logstash-plugin install logstash-filter-de\_dot Validating logstash-filter-de\_dot Installing logstash-filter-de\_dot Error Bundler::InstallError, retrying 1/10 An error occurred while installing logstash-core-event-java (5.2.0), and Bundler cannot continue. Make sure that `gem install logstash-core-event-java -v '5.2.0'` succeeds befor…

provides the answer.

---

<div class="post-metadata">

**Author:** ![kirangavali](https://avatars.discourse-cdn.com/v4/letter/k/77aa72/32.png) [@kirangavali](https://discuss.elastic.co/u/kirangavali)\
**Post date:** [June 19, 2019, 1:53pm UTC](https://discuss.elastic.co/t/installing-logstash-plugin-inside-docker-container/186477/4 "2019-06-19T13:53:41Z")

</div>

Hi @thomas.heuberger

logstash-5.x.x series versions have problem with "jruby 1.27"

If you want execute this then please install logstash 6.2, and jruby 1.9.12 latest version.

May be above information is useful to you, because , I have faced same problem in logstash 5.x.x ,

And I have resolve it by upgrading logstash version 6.4.2 and jruby 1.9.12

---

<div class="post-metadata">

**Author:** ![thomas.heuberger](https://avatars.discourse-cdn.com/v4/letter/t/e8c25b/32.png) [@thomas.heuberger](https://discuss.elastic.co/u/thomas.heuberger)\
**Post date:** [June 19, 2019, 2:05pm UTC](https://discuss.elastic.co/t/installing-logstash-plugin-inside-docker-container/186477/5 "2019-06-19T14:05:42Z")

</div>

> [@thomas.heuberger](#):
>
> image: [docker.elastic.co/logstash/logstash:7.1.1](http://docker.elastic.co/logstash/logstash:7.1.1)

As I wrote in my very first post, the docker image i'm using is image: [docker.elastic.co/logstash/logstash:7.1.1](http://docker.elastic.co/logstash/logstash:7.1.1), which is the latest stable version. However, the solution presented in the thread I linked also works for 7.1.1

thanks, anyways.

---

<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:** [July 17, 2019, 2:05pm UTC](https://discuss.elastic.co/t/installing-logstash-plugin-inside-docker-container/186477/6 "2019-07-17T14:05:59Z")

</div>

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