于是乎就去看了下/var/log/messages下的日志文件,发现有这样一行提示:Mar  1 21:33:39 localhost rsyslogd-2027: imjournal: fscanf on state file `/var/lib/rsyslog/imjournal.state' failed

接着将这行提示放到网上搜索了一番终于找到一篇解答,地址如下:
http://unix.stackexchange.com/questions/124942/rsyslog-not-logging

注意到这篇有这样几行:
When this issue occurs, you can delete /var/lib/rsyslog/imjournal.state and restart the daemon as a workaround.

rsyslog doesn't handle the date directly but only through the systemd API. I've checked the code in imjournal a while ago and this looks like an issue in systemd.


意思是说把/var/lib/rsyslog/imjournal.state文件删掉,然后在执行systemctl restart rsyslog命令,这样/etc/rsyslog.conf修改的内容就会生效。

验证了下,还真的可以。

相关文章:

  • 2022-12-23
  • 2021-07-27
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2021-08-13
猜你喜欢
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-14
  • 2021-11-05
  • 2022-02-16
相关资源
相似解决方案