Closed andsel closed 2 years ago
With PR https://github.com/elastic/logstash/pull/13700 Google Guava shipped with Logstash switched from 24.1.1
to 31.0.1
and this happened in Logstash 8.2.0
In Guava 24.1.1
the method was present but deprecated and result removed in 26.0.0.
Now the gems with java libraries inside, comes with all the classes they needs, just check this by downloading the pubsub plugin gem and navigate the data.tar.gz/vendor/jar-dependencies
folder. There you can find all the classes, including the Guava 24.
The problem is that the JVM classpath is not versioned and when the classpath contains 2 classes in same package with same name, there is no way to control which is loaded first.
So in this case, sometime it works because the Guava 24 class is loaded first, while some other times the classloader loads Guava 31 class and generates the error.
How to solve
Adapt the plugin to use the new Guava class in version 31.0.1
(the same used since Logstash 8.2.0
) and put a strong requirement in gemspec file on Logstash 8.2+.
I encountered this and seems like easy temp workaround is to use logstash 8.1.3 instead of current newest 8.3.3
Hi @SystemZ I've create a PR to update the version of the Google pub sub client in #58 , please could you test that against a Logstash >= 8.2
?
Logstash information:
Please include the following information:
bin/logstash --version
) :8.3.3
but started since Logstash8.2.0
JVM (e.g.
java -version
):If the affected version of Logstash is 7.9 (or earlier), or if it is NOT using the bundled JDK or using the 'no-jdk' version in 7.10 (or higher), please provide the following information:
java -version
)JAVA_HOME
environment variable if set.OS version (
uname -a
if on a Unix-like system): N/ADescription of the problem including expected versus actual behavior: Sometimes Logstash starts and report the error:
Sometimes it works.
Steps to reproduce:
Please include a minimal but complete recreation of the problem, including (e.g.) pipeline definition(s), settings, locale, etc. The easier you make for us to reproduce it, the more likely that somebody will take the time to look at it.
1. 2. 3.
Provide logs (if relevant):