I have just discovered a problem that I don't understand (SLES15 SP2):
I had mis-configured one logrotate
service (in /etc/logrotate.d
).
In SLES 15 logrotate.service
is triggered by logrotate.timer
daily.
However my mis-configured service seems to log an error message only once (which was the main reason I did not discover the problem for a long time).
Can anybody explain what is going on? Other logrotate services seem to be executed (I'm not sure).
Some Details
The error from logrotate was caused by a failed postrotate
action,
specifically the failure to send SIGHUP
to the running process.
Syslog messages:
Dec 18 00:00:20 h16 systemd[1]: Starting Rotate log files...
Dec 18 00:00:20 h16 logrotate[41799]: Failed to kill unit \x7b__SERVICE__\x7d.service: Unit \x7b__SERVICE__\x7d.service is not loaded.
Dec 18 00:00:20 h16 logrotate[41799]: error: error running shared postrotate script for '/var/log/iotwatch/MD10/*.log '
Dec 18 00:00:20 h16 systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
Dec 18 00:00:20 h16 systemd[1]: Failed to start Rotate log files.
Dec 18 00:00:20 h16 systemd[1]: logrotate.service: Unit entered failed state.
Dec 18 00:00:20 h16 systemd[1]: logrotate.service: Failed with result 'exit-code'.