Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LS 2.4.1 - can't use translate filter after v3.2.0 #69

Open
jfwarner opened this issue Aug 15, 2018 · 10 comments
Open

LS 2.4.1 - can't use translate filter after v3.2.0 #69

jfwarner opened this issue Aug 15, 2018 · 10 comments

Comments

@jfwarner
Copy link

Using logstash:2.4.1 and installing logstash-filter-translate with the same mechanism I've been using for 3+ years:

/opt/logstash/bin/logstash-plugin install logstash-filter-translate

Logstash is now crashing on loading my conf file with the error:

:reason=>"Couldn't find any filter plugin named 'translate'. Are you sure this is correct? Trying to load the translate filter plugin resulted in this error: no such file to load -- logstash/util/loggable"

Currently have a production outage due to this until I retrofit the plugin installation with a --version 3.1.0 - any help on patching this and cutting a new release would be appreciated.

@ccayg-sainsburys
Copy link

metoo - my investigation in comment:
#67 (comment)

@guyboertje
Copy link

You will have to stick with v 3.1.0.

Version 3.2.0 uses the logging platform made available by Logstash core in LS 5.0.0 only.

Apologies, I should have pinned the logstash-core-plugin-api to >= 2.1.16

@jfwarner
Copy link
Author

Could this be fixed by undoing the logging changes, making a release, then reapplying the logging changes, pinning logstash-core-plugin-api, and making another release?

@guyboertje
Copy link

It is relatively easy to add a compatible version of the loggable file. There is some logic in patching your logstash - more and more plugins are being updated to use loggable that you could potentially take advantage of.

Put the following content into a file at this location...

<logstash 2.4.1 folder>/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.1-java/lib/logstash/util/loggable.rb

# encoding: utf-8
require "logstash/logging"
require "logstash/namespace"

module LogStash module Util
  module Loggable
    def self.included(klass)
      def klass.logger
        @logger ||= Cabin::Channel.get(LogStash)
      end

      def logger
        self.class.logger
      end
    end
  end
end; end

@jfwarner
Copy link
Author

There are many ways of fixing this problem by making code or configuration changes on the customer end, changes that every customer affected by this would have to do to get back to something that was working yesterday. If we could fix it in one place, upstream, it would probably save a great many people a lot of heartache.

@guyboertje
Copy link

@colinsurprenant and I discussed an alternative which we think will work for this and other plugins to have backward compatibility on Logstash 2.4.1 with regards to Loggable.

I will create a separate gem that supplies the above code if logstash-core does not have the file. This plugin will depend on that gem in 3.2.1.

@guyboertje
Copy link

@jfwarner @ccayg-sainsburys

The logstash team and contributors really have no idea how many 2.4.1 installations are in production and actively being upgraded to newer plugin versions. It could be tens or thousands.
We make changes with the assumption that most people have upgraded to v5 or 6 by now.

@robcowart
Copy link

There are likely more compatibility issues than just logging. See... robcowart/elastiflow#166

In this case the user was using 6.4.0.

@robcowart
Copy link

robcowart commented Aug 25, 2018

Another... elastic/logstash#9936

@guyboertje guyboertje changed the title Can't use translate filter after v3.2.0 LS 2.4.1 - can't use translate filter after v3.2.0 Aug 27, 2018
@Herrad
Copy link

Herrad commented Sep 28, 2018

This has just bitten me too, thankfully on a legacy system I'm phasing out. I was using v2.4.0 so needed to adjust the path above from 2.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants