Centos 7 restart rsyslog show "imfile: on startup file '/root/test_one.log' does not exist", actually it existed before
Posted: 2019/11/03 12:14:28
Steps to reproduce the behavior
1. add file /etc/rsyslog.d/test_one.conf:
2. create a crontab */1 * * * * /bin/date >> /root/test_one.log
3.restart services
3. then systemctl status rsyslog -l show the message
By the way, also I had tried to stop service use systemctl stop rsyslog, just use simple command as folllow /usr/sbin/rsyslogd -n -f /etc/rsyslog.conf the log was ran will. So I can't sure is this a issuse for centos or rsyslog.
Environment
rsyslog version: v8.24.0-34.el7
platform: CentOS Linux release 7.6.1810 (Core), kernel 3.10.0-957.10.1.el7.x86_64
1. add file /etc/rsyslog.d/test_one.conf:
Code: Select all
# Config for file input test
$ModLoad imfile
$InputFileName /root/test_one.log
$InputFileTag test_one:
$InputFileSeverity notice
$InputFileStateFile state_test_one
$InputFilePersistStateInterval 25000
$InputFileFacility local0
$InputRunFileMonitor
local0.* /var/log/test_one.log
&~
3.restart services
Code: Select all
systemctl restart systemd-journald.socket
systemctl restart rsyslog
Code: Select all
Nov 03 06:17:34 192-168-123-218 rsyslogd[104982]: imfile: on startup file '/root/test_one.log' does not exist but is configured in static file monitor - this may indicate a misconfiguration. If the file appears at a later time, it will automatically be processed. Reason: Permission denied [v8.24.0-34.el7]
Environment
rsyslog version: v8.24.0-34.el7
platform: CentOS Linux release 7.6.1810 (Core), kernel 3.10.0-957.10.1.el7.x86_64