-
Notifications
You must be signed in to change notification settings - Fork 56
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
Psych::DisallowedClass exception: Tried to load unspecified class: DateTime #138
Comments
It looks like this is happening when the jdbc input plugin tries to load its last run state from a file and deserializes the timestamp (using the the Time class in the Psych YAML parser). Deleting the .logstash_jdbc_last_run (or the one you specified) solves the issue, but you lose your state and restart from the beginning |
Thank you for this idea. I will give it a try, but am sceptical because I am always using absolute paths for the .logstash_jdbc_last_run file, and this path is writeable for the logstash process. I will report back. |
I can confirm that deleting the last_run file makes the exception disappear, the config runs without an error, and a new last_run file is written to the absolute path. Then, for testing, using the previous file will make throw the exception again. I examined the working last_run file and the non-working one with lsattr - they are the exact same attributes. Also the ownership is the same. |
This exception was caused by an accidental install of the Psych 5.x gem in Logstash's jruby bundle. This led to incompatible YAML methods overriding the Logstash core supplied ones. Sorry for the confusion. |
Good find @jbwl |
It was a User / DevOp mistake, not a bug in Logstash or this plugin. |
This is still broken, but I don't see how I as user am at fault. 8.8.0 - fine
If I have exactly one |
FWIW, logstash 8.8.2 fixes this problem. |
Fixed via #125 (as |
Logstash information:
Please include the following information:
JVM (e.g.
java -version
): openjdk 11.0.19 2023-04-18OS version (
uname -a
if on a Unix-like system): Linux b2b 5.15.0-73-generic #80-Ubuntu SMP Mon May 15 15:18:26 UTC 2023 x86_64 x86_64 x86_64 GNU/LinuxDescription of the problem including expected versus actual behavior:
Pipeline using the JDBC input from this plugin will terminate with the exception mentioned in the topic.
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.
Pipeline definition:
Provide logs (if relevant):
The text was updated successfully, but these errors were encountered: