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

logstash-input-journald crashes forever on bad message #24

Open
runesl opened this issue Aug 30, 2017 · 1 comment
Open

logstash-input-journald crashes forever on bad message #24

runesl opened this issue Aug 30, 2017 · 1 comment

Comments

@runesl
Copy link

runesl commented Aug 30, 2017

I don't know how the bad message occured, but it causes the journald input plugin to go into restart loop. A more desirable behaviour would be to drop the message and continue.

  Error: Bad message
[2017-08-30T11:23:04,720][ERROR][logstash.pipeline        ] A plugin had an unrecoverable error. Will restart this plugin.
  Plugin: <LogStash::Inputs::Journald lowercase=>true, seekto=>"head", thisboot=>true, type=>"systemd", tags=>["miner"], id=>"029a27f623922b1d28cce96e23f3629f1578b0f2-1", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_7ed02ee8-0a28-4ecb-96d6-f7643cd12e76", enable_metric=>true, charset=>"UTF-8">, threads=>1, flags=>0, path=>"/var/log/journal", filter=>{:_boot_id=>"4f55d1c32b484c76acb0cf9b24cad083"}, sincedb_write_interval=>15, wait_timeout=>3000000>
  Error: Bad message
[2017-08-30T11:23:05,726][ERROR][logstash.pipeline        ] A plugin had an unrecoverable error. Will restart this plugin.
  Plugin: <LogStash::Inputs::Journald lowercase=>true, seekto=>"head", thisboot=>true, type=>"systemd", tags=>["miner"], id=>"029a27f623922b1d28cce96e23f3629f1578b0f2-1", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_7ed02ee8-0a28-4ecb-96d6-f7643cd12e76", enable_metric=>true, charset=>"UTF-8">, threads=>1, flags=>0, path=>"/var/log/journal", filter=>{:_boot_id=>"4f55d1c32b484c76acb0cf9b24cad083"}, sincedb_write_interval=>15, wait_timeout=>3000000>
  Error: Bad message

@runesl runesl changed the title Plugin crashes forever on bad message logstash-input-journald crashes forever on bad message Aug 30, 2017
pgrangelgo added a commit to pgrangelgo/logstash-input-journald that referenced this issue Nov 6, 2018
When a journald file is corrupted, logstash-input-journald will block
forever on the bad message.

This fixes it by simply skiping over the journald bad message and logging
the observed error.
@matthew-hollick
Copy link

We have recently been hit by this issue in production.
Happy to help test the PR.
Is there anything stopping this being merged?

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

2 participants