Error when installing Java Plugin from Offline Packs

I am experiencing the same issue that Cory_Huebner reported in July:

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.

I am attempting to deploy into a Logstash docker container using the offline plugin install method. When I run the installation, everything appears to be successful:

[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:

[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

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

# 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:

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 for upcoming fix.

1 Like

It seems its fixed in v7.5.1

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