大网数据广告活动
服务器运维问答

Logging not working on Centos 7

· 52CE 我爱测

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…

问题原文

原帖链接 · joshas · CC BY-SA 3.0

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.

已采纳解答

原帖链接 · joshas · CC BY-SA 3.0

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

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2015-12-14)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。