imjournal state file gets corrupt when unexpected reboot or system shutdown happened

Solution Unverified - Updated -

Issue

  • Old log appeared in the /var/log/messages when an unexpected reboot happened on my system.
  • The same log message happened again after resetting the server even though the log messages rotated.
  • It seems that the imjournal state file got corrupt.
  • Following log message appeared when starting the rsyslog service.
Dec 12 01:24:56 example rsyslogd: imjournal: fscanf on state file `/var/lib/rsyslog/imjournal.state' failed  [v8.24.0-34.el7 try http://www.rsyslog.com/e/2027 ]

Environment

  • Red Hat Enterprise Linux (RHEL) 7 and 8
  • rsyslog

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content