# I can not install any LogStash plug-in in ES 5.0

**URL:** <https://discuss.elastic.co/t/i-can-not-install-any-logstash-plug-in-in-es-5-0/64313>\
**Category:** Logstash\
**Created:** [October 28, 2016, 4:40pm UTC](https://discuss.elastic.co/t/i-can-not-install-any-logstash-plug-in-in-es-5-0/64313 "2016-10-28T16:40:09Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![daniellienert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniellienert/32/31435_2.png) [@daniellienert](https://discuss.elastic.co/u/daniellienert)\
**Post date:** [December 21, 2016, 5:53pm UTC](https://discuss.elastic.co/t/i-can-not-install-any-logstash-plug-in-in-es-5-0/64313/21 "2016-12-21T17:53:33Z")

</div>

Thanks @deanso for the hint.  
Sadly there is no proxy involved, the box is directly connected to the internet via NAT.

---

<div class="post-metadata">

**Author:** ![deanso](https://avatars.discourse-cdn.com/v4/letter/d/94ad74/32.png) [@deanso](https://discuss.elastic.co/u/deanso)\
**Post date:** [December 21, 2016, 9:11pm UTC](https://discuss.elastic.co/t/i-can-not-install-any-logstash-plug-in-in-es-5-0/64313/22 "2016-12-21T21:11:15Z")

</div>

just a longshot, but sure the plugin isn't already installed?  
bin/logstash-plugin list --verbose | grep elasticsearch

---

<div class="post-metadata">

**Author:** ![Mormaii](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mormaii/32/10790_2.png) [@Mormaii](https://discuss.elastic.co/u/Mormaii)\
**Post date:** [January 24, 2017, 7:06pm UTC](https://discuss.elastic.co/t/i-can-not-install-any-logstash-plug-in-in-es-5-0/64313/23 "2017-01-24T19:06:31Z")

</div>

Fresh install of 5.1.2 on an AWS instance and the same thing is happening to me

bin/logstash-plugin install logstash-filter-truncate

Validating logstash-filter-truncate  
Installing logstash-filter-truncate  
Error Bundler::InstallError, retrying 1/10  
An error occurred while installing logstash-core-event-java (5.1.2), and Bundler cannot continue.  
Make sure that `gem install logstash-core-event-java -v '5.1.2'` succeeds before bundling.

edit: It apparently got solved by letting it retry several times without touching anything

---

<div class="post-metadata">

**Author:** ![Karl\_Vesterling](https://avatars.discourse-cdn.com/v4/letter/k/eb9ed0/32.png) [@Karl\_Vesterling](https://discuss.elastic.co/u/Karl_Vesterling)\
**Post date:** [January 26, 2017, 6:17pm UTC](https://discuss.elastic.co/t/i-can-not-install-any-logstash-plug-in-in-es-5-0/64313/24 "2017-01-26T18:17:08Z")

</div>

> [@pdevrien](#):
>
> export JAVA\_OPTS="$JAVA\_OPTS -Dhttp.proxyHost=HOST -Dhttp.proxyPort=PORT"

Confirmed, but it doesn't "work itself out" no matter how many retries.

---

<div class="post-metadata">

**Author:** ![itzikHan](https://avatars.discourse-cdn.com/v4/letter/i/eb8c5e/32.png) [@itzikHan](https://discuss.elastic.co/u/itzikHan)\
**Post date:** [January 29, 2017, 1:32pm UTC](https://discuss.elastic.co/t/i-can-not-install-any-logstash-plug-in-in-es-5-0/64313/25 "2017-01-29T13:32:13Z")

</div>

What worked for me is removing the read-only flag from the entire LS folder (the folder was under a VS project and was protected with the flag)

---

<div class="post-metadata">

**Author:** ![merijnweiss](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@merijnweiss](https://discuss.elastic.co/u/merijnweiss)\
**Post date:** [February 1, 2017, 11:12am UTC](https://discuss.elastic.co/t/i-can-not-install-any-logstash-plug-in-in-es-5-0/64313/26 "2017-02-01T11:12:44Z")

</div>

I had the same issue, both on ES5.1 and on ES5.2, on **macOS Sierra 10.12.3**. I have been able to fix the issue by modifying **~/.bash\_profile**.

**Reproducing the error**  
**_1. Try to install a plugin leading to an error:_**  
`./bin/logstash-plugin install logstash-filter-translate_`

```
Validating logstash-filter-translate
Installing logstash-filter-translate
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
	at org.codehaus.plexus.classworlds.launcher.Launcher.getMainClass(Launcher.java:144)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:266)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
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 before bundling.

```

**_2. Confirm that correct Java is installed_**  
`java -version`

```
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

```

**3. Check JAVA HOME setting**  
`echo $JAVA_HOME`

_The return was empty_

**Fixing the error**  
**_1. Add JAVA HOME to the bash profile_**  
`nano ~/.bash_profile`  
Add to the profile:  
`export JAVA_HOME=$(/usr/libexec/java_home)`

**2. Check JAVA HOME setting**  
`echo $JAVA_HOME`

_Returning_:

`/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home`

**3. Try install of a plugin**  
`./bin/logstash-plugin install logstash-filter-translate`

_Returning_:

```
Validating logstash-filter-translate
Installing logstash-filter-translate
Installation successful
```

---

<div class="post-metadata">

**Author:** ![pjanzen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjanzen/32/13756_2.png) [@pjanzen](https://discuss.elastic.co/u/pjanzen)\
**Post date:** [February 1, 2017, 1:17pm UTC](https://discuss.elastic.co/t/i-can-not-install-any-logstash-plug-in-in-es-5-0/64313/27 "2017-02-01T13:17:43Z")

</div>

For those that are behind a proxy, you might want to try to add: -J-Dhttp.proxyHost=your.proxy.server -J-Dhttp.proxyPort=1234 to JRUBY\_OPTS in logstash-plugin

That did the trick for me.

cat /usr/share/logstash/bin/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 -J-Dhttp.proxyHost=your.proxy.server -J-Dhttp.proxyPort=1234"

ruby_exec "${LOGSTASH_HOME}/lib/pluginmanager/main.rb" "$@"
```

---

<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 6, 2017, 4:28am UTC](https://discuss.elastic.co/t/i-can-not-install-any-logstash-plug-in-in-es-5-0/64313/28 "2017-07-06T04:28:59Z")

</div>

Closed on July 6, 2017, 4:28am UTC



[Previous page](https://discuss.elastic.co/t/i-can-not-install-any-logstash-plug-in-in-es-5-0/64313.md?page=1)
