-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
When something is not jsonable, the service stop #3289
Comments
@athoune thanks for the report. Could you please share your config and possibly a sample log line which can reproduce the problem? Clearly, logstash should not crash for a JSON drama :P Once we figure out the root cause we will fix it and also add better exception handling for this. Note that we have an open issue #2477 that we will resume work on shortly that should help with these type of errors. |
The crash appears in jruby_dump. With a dirty hack (dumping bad value to a file) : def jruby_dump(o)
# test for enumerable here to work around an omission in JrJackson::Json.dump to
# also look for Java::JavaUtil::ArrayList, see TODO submit issue
o.is_a?(Enumerable) ? JrJackson::Raw.generate(o) : JrJackson::Json.dump(o)
rescue => e
target = open('/tmp/debug.txt', 'w+')
target.write(o)
raise LogStash::Json::GeneratorError.new(e.message)
end I get this debug :
The null value seems guilty to me. |
This content came from the twitter input plugin. What the hell is |
@athoune ok, this is great info. so |
@colinsurprenant @athoune I'm trying to repro this unsuccessfully. It's tricky because its not clear which @athoune Have you seen this lately? I've been trying to repro this with the following config:
|
@colinsurprenant @athoune Well, I let it run a little longer, and I caught a null. The culprit seems to be: This would seem to be an issue in the twitter plugin, which should not be passing that through directly. I'll also look at the error handlers here. We should probably be rescuing: |
+1 good catch |
I'm closing this issue because a temporary fix has been released. |
The stacktrace doesn't show the root cause. I don't know if it's my specific plugin, or something else, but it crash. Does logstash have to panic for a JSON drama?
The text was updated successfully, but these errors were encountered: