Centos – Logging not working on Centos 7

centoscentos7rsyslog

Long story short – somehow I managed to screw up rsyslogd service on Centos 7 server. Now only thing that appears in /var/log/messages is:

Dec 14 22:13:27 {myhostname} rsyslogd: [origin software="rsyslogd" swVersion="7.4.7" x-pid="1286" x-info="http://www.rsyslog.com"] exiting on signal 15.

Dec 14 22:13:27 {myhostname} rsyslogd: [origin software="rsyslogd" swVersion="7.4.7" x-pid="1477" x-info="http://www.rsyslog.com"] start

Other logs (secure, cron, etc.) are empty too. Restarting service and server didn't help. Messages sent with logger doesn't end up in /var/log/messages file. rsyslogd service is running. Configuration file seems to be correct.
I can see all events in journalctl logs.
I already searched through several posts similar to my problem, but none of them had the solution.

While fastest solution might be reinstalling server, I would like to figure out what caused this problem and how to solve it, in case it happens in the future.
Server is running simple LEMP stack, and last major change to system was hostname change.

Best Answer

This was the solution, not permanent, though:

rm -f /var/lib/rsyslog/imjournal.state

service rsyslog restart

Source: https://bugzilla.redhat.com/show_bug.cgi?id=1088021

Related Topic