logstash-plugins / logstash-filter-mutate

Apache License 2.0
15 stars 75 forks source link

Error registering plugin @klass=LogStash::Filters::Mutate #93

Open dove-young opened 7 years ago

dove-young commented 7 years ago

Logstash version: 5.3.2 OS: CentOS Linux release 7.2.1511 (Core) AME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"

[2017-04-28T14:12:25,289][ERROR][logstash.pipeline        ] Error registering plugin {:plugin=>"#<LogStash::FilterDelegator:0x6a6905bc @id=\"932a0f2c1b467684d54ff2205c1bf3cde66172e4-13\", @klass=LogStash::Filters::Mutate, @metric_events=#<LogStash::Instrument::NamespacedMetric:0x539175db @metric=#<LogStash::Instrument::Metric:0x76556e75 @collector=#<LogStash::Instrument::Collector:0x234898ba @agent=nil, @metric_store=#<LogStash::Instrument::MetricStore:0x12e2d8a @store=#<Concurrent::Map:0x59c9afd9 @default_proc=nil>, @structured_lookup_mutex=#<Mutex:0x4b24453>, @fast_lookup=#<Concurrent::Map:0x63d88137 @default_proc=nil>>>>, @namespace_name=[:stats, :pipelines, :main, :plugins, :filters, :\"932a0f2c1b467684d54ff2205c1bf3cde66172e4-13\", :events]>, @logger=#<LogStash::Logging::Logger:0x7c97068 @logger=#<Java::OrgApacheLoggingLog4jCore::Logger:0x78b62985>>, @filter=<LogStash::Filters::Mutate convert=>{\"rqs-body-status code\"=>\"integer\", \"rqs-body-response body\"=>\"keyword\", \"host\"=>\"keyword\", \"rsp-body-http method\"=>\"keyword\", \"rsp-headers-content-length \"=>\"integer\"}, id=>\"932a0f2c1b467684d54ff2205c1bf3cde66172e4-13\", enable_metric=>true, periodic_flush=>false>>", :error=>"translation missing: en.logstash.agent.configuration.invalid_plugin_register"}
[2017-04-28T14:12:25,289][DEBUG][logstash.filters.grok    ] closing {:plugin=>"LogStash::Filters::Grok"}
[2017-04-28T14:12:25,454][DEBUG][logstash.filters.grok    ] closing {:plugin=>"LogStash::Filters::Grok"}
[2017-04-28T14:12:25,460][DEBUG][logstash.filters.grok    ] closing {:plugin=>"LogStash::Filters::Grok"}
[2017-04-28T14:12:25,471][DEBUG][logstash.filters.json    ] closing {:plugin=>"LogStash::Filters::Json"}
[2017-04-28T14:12:25,471][DEBUG][logstash.filters.grok    ] closing {:plugin=>"LogStash::Filters::Grok"}
[2017-04-28T14:12:25,484][DEBUG][logstash.filters.json    ] closing {:plugin=>"LogStash::Filters::Json"}
[2017-04-28T14:12:25,485][DEBUG][logstash.filters.json    ] closing {:plugin=>"LogStash::Filters::Json"}
[2017-04-28T14:12:25,485][DEBUG][logstash.filters.kv      ] closing {:plugin=>"LogStash::Filters::KV"}
[2017-04-28T14:12:25,485][DEBUG][logstash.filters.kv      ] closing {:plugin=>"LogStash::Filters::KV"}
[2017-04-28T14:12:25,485][DEBUG][logstash.filters.kv      ] closing {:plugin=>"LogStash::Filters::KV"}
[2017-04-28T14:12:25,485][DEBUG][logstash.filters.kv      ] closing {:plugin=>"LogStash::Filters::KV"}
[2017-04-28T14:12:25,493][ERROR][logstash.agent           ] Pipeline aborted due to error {:exception=>#<LogStash::ConfigurationError: translation missing: en.logstash.agent.configuration.invalid_plugin_register>, :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-mutate-3.1.3/lib/logstash/filters/mutate.rb:178:in `register'", "org/jruby/RubyHash.java:1342:in `each'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-mutate-3.1.3/lib/logstash/filters/mutate.rb:172:in `register'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:257:in `register_plugin'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:268:in `register_plugins'", "org/jruby/RubyArray.java:1613:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:268:in `register_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:278:in `start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:207:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:389:in `start_pipeline'"]}
dove-young commented 7 years ago

I found this issue only occurs when I tried to convert a literal value to 'keyword' type. When I tried to convert it to a 'string' type, it goes well.

But according to the datatype doc, 'string' was already replaced by 'keyword'.

https://www.elastic.co/guide/en/elasticsearch/reference/current/string.html

jordansissel commented 7 years ago

This is a bug that occurs when the mutate plugin is trying to report a configuration error.

There is no such type "keyword" for conversion in this filter.

On Fri, Apr 28, 2017 at 12:07 AM dove-young notifications@github.com wrote:

I found this issue only occurs when I tried to convert a literal value to 'keyword' type. When I tried to convert it to a 'string' type, it goes well.

But according to the datatype doc, 'string' was already replaced by 'keyword'.

https://www.elastic.co/guide/en/elasticsearch/reference/current/string.html

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/logstash-plugins/logstash-filter-mutate/issues/93#issuecomment-297924600, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIC6vYENMeu8wg80S8KwYxWtZgNhhYBks5r0ZAVgaJpZM4NLGRZ .