# Error when installing Java Plugin from Offline Packs

**URL:** https://discuss.elastic.co/t/error-when-installing-java-plugin-from-offline-packs/210897
**Category:** Logstash
**Created:** [December 6, 2019, 1:21pm UTC](https://discuss.elastic.co/t/error-when-installing-java-plugin-from-offline-packs/210897 "2019-12-06T13:21:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rgomez](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rgomez](https://discuss.elastic.co/u/rgomez)
#### Post date: [December 6, 2019, 1:21pm UTC](https://discuss.elastic.co/t/error-when-installing-java-plugin-from-offline-packs/210897/1 "2019-12-06T13:21:48Z")

</div>

I am experiencing the same issue that [Cory\_Huebner](https://discuss.elastic.co/u/Cory_Huebner) [reported in July](https://discuss.elastic.co/t/offline-plugin-install-of-java-plugin/192439):

> I am attempting to install a custom output Logstash plugin on Logstash 7.2; the plugin is written in Java based on the instructions found [on this Logstash documentation page](https://www.elastic.co/guide/en/logstash/current/java-output-plugin.html).
> 
> I am attempting to deploy into a Logstash docker container using the [offline plugin install method](https://www.elastic.co/guide/en/logstash/current/offline-plugins.html). When I run the installation, everything appears to be successful:
> 
> ```auto
> [root@ca3715a22ecb logstash-core]# logstash-plugin install file:///co360/plugins/co360-plugins.zip
> OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by org.jruby.util.SecurityHelper to field java.lang.reflect.Field.modifiers
> WARNING: Please consider reporting this to the maintainers of org.jruby.util.SecurityHelper
> WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
> WARNING: All illegal access operations will be denied in a future release
> Installing file: /co360/plugins/co360-plugins.zip
> Install successful
> 
> ```
> 
> However, when I start Logstash, I get this error:
> 
> ```auto
> [ERROR] 2019-07-26 12:36:36.185 [main] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (LoadError) Java plugin 'logstash-output-notify_plugin' does not contain a single jar file with the plugin's name and version
> 
> ```
> 
> ...  
> [Offline plugin install of Java plugin](https://discuss.elastic.co/t/offline-plugin-install-of-java-plugin/192439)

Java plugins only work if installed from the gem, however, this does not work for systems not connected to the internet.

```auto
# https://www.elastic.co/guide/en/logstash/current/java-filter-plugin.html#_installing_the_java_plugin_in_logstash_3
bin/logstash-plugin install --no-verify --local /path/to/javaPlugin.gem

```

Other discussions:

- [How can I deploy my custom filter plugin? · Issue #12 · logstash-plugins/logstash-filter-java\_filter\_example · GitHub](https://github.com/logstash-plugins/logstash-filter-java_filter_example/issues/12)
- [Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (LoadError) Java plugin 'logstash-filter-xxx' does not contain a single jar file with the plugin's name and version · Issue #14 · logstash-plugins/logstash-filter-java\_filter\_example · GitHub](https://github.com/logstash-plugins/logstash-filter-java_filter_example/issues/14)

---

<div class="post-metadata">

### Author: ![siriusblock](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siriusblock/32/45680_2.png) [@siriusblock](https://discuss.elastic.co/u/siriusblock)
#### Post date: [December 13, 2019, 10:11am UTC](https://discuss.elastic.co/t/error-when-installing-java-plugin-from-offline-packs/210897/2 "2019-12-13T10:11:02Z")

</div>

We had same issue.

The manual offline install workaround is:

1. There is a Gemfile that is located in the root directory of Logstash. Add your plugin reference  
gem "logstash-filter-some\_plugin\_name", "1.0.0", :path =\> "vendor/local\_gems/35907c4d/logstash-filter-some\_plugin\_name-1.0.0"
2. Copy the content of Gem file archive (logstash-filter-some\_plugin\_name-1.0.0.gem\data.tar.gz\data.tar \<-- content of data.tar) to "vendor/local\_gems/35907c4d/logstash-filter-some\_plugin\_name-1.0.0"

Aaand youre done! Please see [https://github.com/elastic/logstash/issues/11325](https://github.com/elastic/logstash/issues/11325) for upcoming fix.

---

<div class="post-metadata">

### Author: ![siriusblock](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siriusblock/32/45680_2.png) [@siriusblock](https://discuss.elastic.co/u/siriusblock)
#### Post date: [December 13, 2019, 10:18am UTC](https://discuss.elastic.co/t/error-when-installing-java-plugin-from-offline-packs/210897/3 "2019-12-13T10:18:08Z")

</div>

It seems its fixed in v7.5.1

---

<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: [January 10, 2020, 10:20am UTC](https://discuss.elastic.co/t/error-when-installing-java-plugin-from-offline-packs/210897/4 "2020-01-10T10:20:27Z")

</div>

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