A few issues with logrotate - almost fixed - but a little help needed

  • In OMV 4 I like how syslog is rotated and HUPed every day at 12am


    In OMV 5 I notice this is not happening on my new install of OMV 5 on rock64 / Armbian buster kernel 5.4


    Looking at syslog, I noticed that logrotate had some issues and was failing - see entries below


    Feb 11 00:00:10 rock64 logrotate[28075]: error: monit:9 lines must begin with a keyword or a filename (possibly in double quotes)
    Feb 11 00:00:10 rock64 logrotate[28075]: error: openmediavault-rsync:1 duplicate log entry for /var/log/rsync.log
    Feb 11 00:00:10 rock64 logrotate[28075]: error: found error in file openmediavault-rsync, skipping
    Feb 11 00:00:10 rock64 logrotate[28075]: error: samba:1 duplicate log entry for /var/log/samba/log.smbd
    Feb 11 00:00:10 rock64 logrotate[28075]: error: found error in file samba, skipping
    Feb 11 00:00:10 rock64 systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
    Feb 11 00:00:10 rock64 systemd[1]: logrotate.service: Failed with result 'exit-code'.


    So I looked and fixed the files that had issues in the etc/logrotate.d folder.


    Next day the log looks much better and the log was copied to syslog.1 but syslog was not HUPed - entries below


    Feb 12 00:00:04 rock64 systemd[1]: Starting Rotate log files...
    Feb 12 00:00:04 rock64 systemd[1]: Starting Daily man-db regeneration...
    Feb 12 00:00:04 rock64 armbian-ramlog[18426]: Wed Feb 12 00:00:04 AEDT 2020: Syncing logs to storage
    Feb 12 00:00:05 rock64 armbian-ramlog[18426]: sending incremental file list
    Feb 12 00:00:05 rock64 armbian-ramlog[18426]: auth.log
    Feb 12 00:00:05 rock64 armbian-ramlog[18426]: daemon.log
    Feb 12 00:00:05 rock64 armbian-ramlog[18426]: lastlog
    Feb 12 00:00:09 rock64 systemd[1]: logrotate.service: Succeeded.


    So now the only problem is that syslog is not being HUPed to start a new / empty log


    looking at the logrotate settings for syslog in logrotate.d I have found the following


    postrotate
    /usr/lib/rsyslog/rsyslog-rotate


    In OMV 4 the setting is


    postrotate
    invoke-rc.d rsyslog rotate > /dev/null



    Not sure what to do from here but I have changed the config to use the OMV4 setting - invoke-rc.d rsyslog rotate > /dev/null


    will see if this fixes the issue tomorrow.


    Any advice / help welcomed...


    Thanks

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!