Open jfwarner opened 6 years ago
metoo - my investigation in comment: https://github.com/logstash-plugins/logstash-filter-translate/pull/67#issuecomment-413206438
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
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?
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
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.
@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.
@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.
There are likely more compatibility issues than just logging. See... https://github.com/robcowart/elastiflow/issues/166
In this case the user was using 6.4.0.
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.
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.