awslabs / logstash-output-amazon_es

Logstash output plugin to sign and export logstash events to Amazon Elasticsearch Service
Apache License 2.0
375 stars 103 forks source link

seeing error running the plugin with logstash 7.16.1 #177

Closed weizhu-us closed 2 years ago

weizhu-us commented 2 years ago

In order to address Apache Log4j2 Issue (CVE-2021-44228) for logstash. We are trying to upgrade logstash to the latest version 7.16.1

https://www.elastic.co/guide/en/logstash/current/logstash-7-16-1.html

There is error loading logstash-output-amazon_es version 6.4.2 with the following error:

[2021-12-14T03:09:11,242][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"7.16.1", "jruby.version"=>"jruby 9.2.20.1 (2.5.8) 2021-11-30 2a2962fbd1 OpenJDK 64-Bit Server VM 11.0.13+8 on 11.0.13+8 +jit [linux-x86_64]"} [2021-12-14T03:09:11,368][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified [2021-12-14T03:09:11,670][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600, :ssl_enabled=>false} [2021-12-14T03:09:12,206][INFO ][org.reflections.Reflections] Reflections took 46 ms to scan 1 urls, producing 119 keys and 417 values [2021-12-14T03:09:12,793][INFO ][logstash.outputs.elasticsearch][main] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["//search-XXXXXXXX.us-east-1.es.amazonaws.com"]} [2021-12-14T03:09:12,796][ERROR][logstash.javapipeline ][main] Pipeline error {:pipeline_id=>"main", :exception=>#<ArgumentError: wrong number of arguments (given 1, expected 0)>, :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-amazon_es-6.4.2-java/lib/logstash/outputs/amazon_es.rb:251:in build_client'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.2.3-java/lib/logstash/outputs/elasticsearch.rb:275:inregister'", "org/logstash/config/ir/compiler/OutputStrategyExt.java:131:in register'", "org/logstash/config/ir/compiler/AbstractOutputDelegatorExt.java:68:inregister'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:232:in block in register_plugins'", "org/jruby/RubyArray.java:1821:ineach'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:231:in register_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:589:inmaybe_setup_out_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:244:in start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:189:inrun'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:141:in `block in start'"], "pipeline.sources"=>["/mnt/logstash_es/teletraan/logstash_es/logstash.conf"], :thread=>"#<Thread:0x4c8cb975@/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:129 run>"} [2021-12-14T03:09:12,796][INFO ][logstash.javapipeline ][main] Pipeline terminated {"pipeline.id"=>"main"} [2021-12-14T03:09:12,813][ERROR][logstash.agent ] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create

, action_result: false", :backtrace=>nil} [2021-12-14T03:09:12,823][INFO ][logstash.runner ] Logstash shut down.

dignajar commented 2 years ago

The same here..

cyperplex commented 2 years ago

Hi im also getting this error on the same version, as trying to patch for the log4j issue

dlvenable commented 2 years ago

@weizhu-us ,

Logstash 7.x requires using the amazon_es plugin version 7.0.1. Please update to 7.0.1:

bin/logstash-plugin update logstash-output-amazon_es
weizhu-us commented 2 years ago

Didn't know there is version 7.0.1. I thought the latest is 6.4.2 https://github.com/awslabs/logstash-output-amazon_es/releases

cyperplex commented 2 years ago

Ive just updated to that version, running a load test and so far it's stable ,if you have the --version flag remove it and install the plug in, it should pull the latest version from the Ruby repo.

weizhu-us commented 2 years ago

Verified plugin version 7.0.1 works with logstash 7.16.1

dignajar commented 2 years ago

Where is the release for 7.0.1 ? where is the changelog ? also, I don't see any push to master or any new branch..

cyperplex commented 2 years ago

Logstash pulls the plugin from : https://rubygems.org/gems/logstash-output-amazon_es You can see the changelog if you follow the links.

Here is the official repo, release tags are also available : https://github.com/awslabs/logstash-output-amazon_es

I can confirm that the 7.0.1 plugin works for me.