Logrotate stops working

Hi everyone!
I am having a problem that Logrotate works correctly then stops working. In this last case it worked for 7 days after a reboot, then stopped rotating the logs (I’m really just mainly concerned about the “full” log):
[[email protected] ~]# ls -l /var/log/asterisk/full*
-rw-r----- 1 asterisk asterisk 64711786 Oct 19 09:51 /var/log/asterisk/full
-rw-r----- 1 asterisk asterisk 7112689 Oct 8 03:22 /var/log/asterisk/full-20211008
-rw-r----- 1 asterisk asterisk 24702273 Oct 9 03:25 /var/log/asterisk/full-20211009
-rw-r----- 1 asterisk asterisk 599871 Oct 10 03:20 /var/log/asterisk/full-20211010
-rw-r----- 1 asterisk asterisk 348038 Oct 11 03:24 /var/log/asterisk/full-20211011
-rw-r----- 1 asterisk asterisk 16249144 Oct 12 03:28 /var/log/asterisk/full-20211012
-rw-r----- 1 asterisk asterisk 18314454 Oct 13 03:07 /var/log/asterisk/full-20211013
-rw-r----- 1 asterisk asterisk 20116047 Oct 14 03:32 /var/log/asterisk/full-20211014

Here is what happens when I try to run logrotate manually:
[[email protected] ~]# /usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf -d
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file apcupsd
reading config file asterisk
reading config file bootlog
reading config file chrony
reading config file fail2ban
reading config file freepbx-core
reading config file freepbx-qcallback
reading config file freepbx-restapps
reading config file freepbx-sangomacrm
reading config file freepbx-ucp
reading config file freepbx-zulu
reading config file httpd
reading config file iscsiuiolog
reading config file mariadb
reading config file mongodb
reading config file oc_logrotate
reading config file pms
reading config file psacct
reading config file radiusd
reading config file redis
reading config file sangomaconnect
reading config file smartoffice
reading config file syslog
reading config file vsftpd
reading config file wpa_supplicant
reading config file yum
Allocating hash table for state file, size 15360 B

Handling 37 logs

rotating pattern: /var/log/apcupsd.events after 1 days (14 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apcupsd.events
log /var/log/apcupsd.events does not exist – skipping

rotating pattern: /var/log/asterisk/queue_log after 1 days (30 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/queue_log
log does not need rotating (log has been rotated at 2021-10-19 3:48, that is not day ago yet)
switching euid to 0 and egid to 0

rotating pattern: /var/spool/mail/asterisk after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 12
considering log /var/spool/mail/asterisk
log does not need rotating (log has been rotated at 2021-10-19 3:48, that is not day ago yet)
switching euid to 0 and egid to 0

rotating pattern: /var/log/asterisk/messages
/var/log/asterisk/event_log
/var/log/asterisk/full
/var/log/asterisk/dtmf
/var/log/asterisk/fail2ban after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/messages
log /var/log/asterisk/messages does not exist – skipping
considering log /var/log/asterisk/event_log
log /var/log/asterisk/event_log does not exist – skipping
considering log /var/log/asterisk/full
log does not need rotating (log has been rotated at 2021-10-19 3:48, that is not day ago yet)
considering log /var/log/asterisk/dtmf
log /var/log/asterisk/dtmf does not exist – skipping
considering log /var/log/asterisk/fail2ban
log does not need rotating (log has been rotated at 2021-10-19 3:48, that is not day ago yet)
not running postrotate script, since no logs were rotated
switching euid to 0 and egid to 0

rotating pattern: /var/log/boot.log
after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/boot.log
log does not need rotating (log is empty)
rotating pattern: /var/log/chrony/.log after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/chrony/
.log
log /var/log/chrony/*.log does not exist – skipping
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/fail2ban.log 30720 bytes (14 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/fail2ban.log
log does not need rotating (log size is below the ‘size’ threshold)

rotating pattern: /var/log/asterisk/freepbx_dbug 524288000 bytes (7 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/freepbx_dbug
log /var/log/asterisk/freepbx_dbug does not exist – skipping
switching euid to 0 and egid to 0

rotating pattern: /var/log/asterisk/freepbx_debug
/var/log/asterisk/freepbx.log
/var/log/asterisk/freepbx_security.log 104857600 bytes (7 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/freepbx_debug
log /var/log/asterisk/freepbx_debug does not exist – skipping
considering log /var/log/asterisk/freepbx.log
log does not need rotating (log size is below the ‘size’ threshold)
considering log /var/log/asterisk/freepbx_security.log
log does not need rotating (log size is below the ‘size’ threshold)
switching euid to 0 and egid to 0

rotating pattern: /var/log/asterisk/core-fastagi_*.log 52428800 bytes (5 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/core-fastagi_err.log
log does not need rotating (log size is below the ‘size’ threshold)
considering log /var/log/asterisk/core-fastagi_out.log
log does not need rotating (log size is below the ‘size’ threshold)
not running postrotate script, since no logs were rotated
switching euid to 0 and egid to 0

rotating pattern: /var/log/asterisk/qcallback_.log 52428800 bytes (5 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/qcallback_
.log
log /var/log/asterisk/qcallback_*.log does not exist – skipping
not running postrotate script, since no logs were rotated
switching euid to 0 and egid to 0

rotating pattern: /var/log/asterisk/restapps_*.log 52428800 bytes (5 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/restapps_err.log
log does not need rotating (log size is below the ‘size’ threshold)
considering log /var/log/asterisk/restapps_out.log
log does not need rotating (log size is below the ‘size’ threshold)
not running postrotate script, since no logs were rotated
switching euid to 0 and egid to 0

rotating pattern: /var/log/asterisk/dpmaapps.log 104857600 bytes (7 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/dpmaapps.log
log /var/log/asterisk/dpmaapps.log does not exist – skipping
switching euid to 0 and egid to 0

rotating pattern: /var/log/asterisk/sangomacrm*.log 52428800 bytes (5 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/sangomacrm*.log
log /var/log/asterisk/sangomacrm*.log does not exist – skipping
switching euid to 0 and egid to 0

rotating pattern: /var/log/asterisk/ucp_*.log 52428800 bytes (5 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/ucp_err.log
log does not need rotating (log size is below the ‘size’ threshold)
considering log /var/log/asterisk/ucp_out.log
log does not need rotating (log size is below the ‘size’ threshold)
not running postrotate script, since no logs were rotated
switching euid to 0 and egid to 0

rotating pattern: /var/log/asterisk/zulu_*.log 52428800 bytes (5 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/zulu_out.log
log does not need rotating (log size is below the ‘size’ threshold)
not running postrotate script, since no logs were rotated
switching euid to 0 and egid to 0

rotating pattern: /var/log/httpd/*log after 1 days (14 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/httpd/access_log
log does not need rotating (log has been rotated at 2021-10-19 3:48, that is not day ago yet)
considering log /var/log/httpd/error_log
log does not need rotating (log has been rotated at 2021-10-19 3:48, that is not day ago yet)
considering log /var/log/httpd/ssl_access_log
log does not need rotating (log is empty)considering log /var/log/httpd/ssl_error_log
log does not need rotating (log has been rotated at 2021-10-19 3:48, that is not day ago yet)
considering log /var/log/httpd/ssl_request_log
log does not need rotating (log is empty)not running postrotate script, since no logs were rotated

rotating pattern: /var/log/iscsiuio.log weekly (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/iscsiuio.log
log /var/log/iscsiuio.log does not exist – skipping
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/mongodb/*.log weekly (10 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/mongodb/mongod.log
log does not need rotating (log has been rotated at 2021-10-17 3:50, that is not week ago yet)

rotating pattern: /var/log/asterisk/oracle_connector.log
/var/log/asterisk/oracle_engine_err.log
/var/log/asterisk/oracle_engine_out.log after 1 days (15 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/oracle_connector.log
log /var/log/asterisk/oracle_connector.log does not exist – skipping
considering log /var/log/asterisk/oracle_engine_err.log
log /var/log/asterisk/oracle_engine_err.log does not exist – skipping
considering log /var/log/asterisk/oracle_engine_out.log
log /var/log/asterisk/oracle_engine_out.log does not exist – skipping
switching euid to 0 and egid to 0

rotating pattern: /var/log/asterisk/pms.log after 1 days (15 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/pms.log
log does not need rotating (log has been rotated at 2021-10-19 3:48, that is not day ago yet)
switching euid to 0 and egid to 0

rotating pattern: /var/account/pacct after 1 days (31 rotations)
empty log files are not rotated, old logs are removed
considering log /var/account/pacct
log does not need rotating (log is empty)
rotating pattern: /var/log/radius/radacct//detail monthly (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/radius/radacct/
/detail

rotating pattern: /var/log/radius/checkrad.log monthly (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/radius/checkrad.log
log /var/log/radius/checkrad.log does not exist – skipping

rotating pattern: /var/log/radius/radius.log monthly (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/radius/radius.log
log /var/log/radius/radius.log does not exist – skipping

rotating pattern: /var/log/radius/radwtmp monthly (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/radius/radwtmp
log /var/log/radius/radwtmp does not exist – skipping

rotating pattern: /var/log/radius/sqltrace.sql monthly (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/radius/sqltrace.sql
log /var/log/radius/sqltrace.sql does not exist – skipping

rotating pattern: /var/log/redis/*.log weekly (10 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/redis/redis.log
log does not need rotating (log has been rotated at 2021-10-17 3:50, that is not week ago yet)

rotating pattern: /var/log/asterisk/sangomaconnect.log 52428800 bytes (10 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/sangomaconnect.log
log /var/log/asterisk/sangomaconnect.log does not exist – skipping
not running postrotate script, since no logs were rotated
switching euid to 0 and egid to 0

rotating pattern: /var/log/asterisk/iot-server.log 52428800 bytes (10 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/iot-server.log
log does not need rotating (log size is below the ‘size’ threshold)
not running postrotate script, since no logs were rotated
switching euid to 0 and egid to 0

rotating pattern: /var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/cron
log does not need rotating (log has been rotated at 2021-10-19 3:48, that is not day ago yet)
considering log /var/log/maillog
log does not need rotating (log has been rotated at 2021-10-19 3:48, that is not day ago yet)
considering log /var/log/messages
log does not need rotating (log has been rotated at 2021-10-19 3:48, that is not day ago yet)
considering log /var/log/secure
log does not need rotating (log has been rotated at 2021-10-19 3:48, that is not day ago yet)
considering log /var/log/spooler
log does not need rotating (log has been rotated at 2021-10-19 3:48, that is not day ago yet)
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/vsftpd.log after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/vsftpd.log
log does not need rotating (log has been rotated at 2021-10-19 3:48, that is not day ago yet)

rotating pattern: /var/log/xferlog after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/xferlog
log /var/log/xferlog does not exist – skipping

rotating pattern: /var/log/wpa_supplicant.log 30720 bytes (14 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/wpa_supplicant.log
log does not need rotating (log size is below the ‘size’ threshold)

rotating pattern: /var/log/yum.log yearly (14 rotations)
empty log files are not rotated, log files >= 30720 are rotated earlier, old logs are removed
considering log /var/log/yum.log
log does not need rotating (log has been rotated at 2021-10-7 11:50, that is not year ago yet)

rotating pattern: /var/log/wtmp monthly (1 rotations)
empty log files are rotated, only log files >= 1048576 bytes are rotated, old logs are removed
considering log /var/log/wtmp
log does not need rotating (log has been rotated at 2021-10-7 12:31, that is not month ago yet)
log does not need rotating (‘misinze’ directive is used and the log size is smaller than the minsize value
rotating pattern: /var/log/btmp monthly (1 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/btmp
log does not need rotating (log has been rotated at 2021-10-7 12:31, that is not month ago yet)

After reviewing posting Logrotate Bug?, I looked for the pm2 script/process running. I don’t see it:
[[email protected] ~]# ps -ef |grep pm2
asterisk 14827 1 0 Oct07 ? 00:11:03 PM2 v4.5.0: God Daemon (/home/asterisk/.pm2)
root 48370 45643 0 09:55 pts/0 00:00:00 grep --color=auto pm2

Here are the modules installed. I am a bit hesitant to upgrade everything (without a specific knowledge about what will resolve this issue) since this is a production system:
[[email protected] ~]# fwconsole ma list
No repos specified, using: [standard,commercial] from last GUI settings

±---------------------±-----------±--------±------------+
| Module | Version | Status | License |
±---------------------±-----------±--------±------------+
| accountcodepreserve | 13.0.2.2 | Enabled | GPLv2 |
| adv_recovery | 15.0.36 | Enabled | Commercial |
| amd | 15.0.3 | Enabled | GPLv3+ |
| announcement | 15.0.3.13 | Enabled | GPLv3+ |
| api | 15.0.3.15 | Enabled | AGPLv3+ |
| areminder | 15.0.14.24 | Enabled | Commercial |
| arimanager | 15.0.3.11 | Enabled | GPLv3+ |
| asterisk-cli | 14.0.4 | Enabled | GPLv3+ |
| asteriskinfo | 15.0.14 | Enabled | GPLv3+ |
| backup | 15.0.10.61 | Enabled | GPLv3+ |
| blacklist | 15.0.2.14 | Enabled | GPLv3+ |
| broadcast | 15.0.13 | Enabled | Commercial |
| builtin | | Enabled | |
| bulkhandler | 13.0.23 | Enabled | GPLv3+ |
| calendar | 15.0.4.21 | Enabled | GPLv3+ |
| callaccounting | 15.0.24 | Enabled | Commercial+ |
| callback | 15.0.12 | Enabled | GPLv3+ |
| callerid | 15.0.16 | Enabled | Commercial |
| callforward | 15.0.16 | Enabled | AGPLv3+ |
| calllimit | 15.0.5.6 | Enabled | Commercial |
| callrecording | 15.0.7.18 | Enabled | AGPLv3+ |
| callwaiting | 15.0.4.6 | Enabled | GPLv3+ |
| cdr | 15.0.17.10 | Enabled | GPLv3+ |
| cel | 15.0.15.13 | Enabled | GPLv3+ |
| certman | 15.0.45 | Enabled | AGPLv3+ |
| cidlookup | 15.0.20 | Enabled | GPLv3+ |
| conferences | 15.0.7.11 | Enabled | GPLv3+ |
| conferencespro | 15.0.3.18 | Enabled | Commercial |
| configedit | 13.0.7.3 | Enabled | AGPLv3+ |
| contactmanager | 15.0.8.34 | Enabled | GPLv3+ |
| core | 15.0.12.73 | Enabled | GPLv3+ |
| cos | 15.0.14 | Enabled | Commercial |
| customappsreg | 15.0.14 | Enabled | GPLv3+ |
| cxpanel | 15.0.4 | Enabled | GPLv3 |
| dahdiconfig | 15.0.5.7 | Enabled | GPLv3+ |
| dashboard | 15.0.12 | Enabled | AGPLv3+ |
| daynight | 15.0.12 | Enabled | GPLv3+ |
| dictate | 15.0.7 | Enabled | GPLv3+ |
| digium_phones | 15.0.6 | Enabled | GPLv2 |
| digiumaddoninstaller | 13.0.1.1 | Enabled | GPLv2 |
| directory | 15.0.18 | Enabled | GPLv3+ |
| disa | 15.0.4.9 | Enabled | AGPLv3+ |
| donotdisturb | 15.0.10 | Enabled | GPLv3+ |
| dynroute | 15.0.2 | Enabled | GPLv3+ |
| endpoint | 15.0.39.93 | Enabled | Commercial |
| extensionroutes | 15.0.8 | Enabled | Commercial |
| extensionsettings | 13.0.4 | Enabled | GPLv3+ |
| fax | 15.0.21 | Enabled | GPLv3+ |
| faxpro | 15.0.8.13 | Enabled | Commercial |
| featurecodeadmin | 13.0.6.11 | Enabled | GPLv3+ |
| filestore | 15.0.3.19 | Enabled | AGPLv3 |
| findmefollow | 15.0.27 | Enabled | GPLv3+ |
| framework | 15.0.17.43 | Enabled | GPLv2+ |
| fw_langpacks | 14.0.1 | Enabled | GPLv3+ |
| hotelwakeup | 15.0.5.5 | Enabled | GPLv2 |
| iaxsettings | 15.0.8 | Enabled | AGPLv3 |
| infoservices | 15.0.3 | Enabled | GPLv2+ |
| iotserver | 15.0.3.3 | Enabled | Commercial |
| irc | 13.0.1 | Enabled | GPLv3+ |
| ivr | 15.0.29 | Enabled | GPLv3+ |
| languages | 15.0.12 | Enabled | GPLv3+ |
| logfiles | 15.0.14 | Enabled | GPLv3+ |
| manager | 15.0.12 | Enabled | GPLv2+ |
| miscapps | 15.0.10 | Enabled | GPLv3+ |
| miscdests | 15.0.2.12 | Enabled | GPLv3+ |
| music | 15.0.22 | Enabled | GPLv3+ |
| oracle_connector | 15.0.9 | Enabled | Commercial |
| outroutemsg | 15.0.9 | Enabled | GPLv3+ |
| paging | 15.0.4.32 | Enabled | GPLv3+ |
| pagingpro | 15.0.1.22 | Enabled | Commercial |
| parking | 15.0.15.4 | Enabled | GPLv3+ |
| parkpro | 15.0.13 | Enabled | Commercial |
| pbdirectory | 2.11.0.6 | Enabled | GPLv3+ |
| phonebook | 15.0.12 | Enabled | GPLv3+ |
| phpinfo | 13.0.2 | Enabled | GPLv2+ |
| pinsets | 15.0.1.15 | Enabled | GPLv3+ |
| pinsetspro | 15.0.4 | Enabled | Commercial |
| pm2 | 15.0.6 | Enabled | AGPLv3+ |
| pms | 15.0.2.53 | Enabled | Commercial |
| presencestate | 15.0.11 | Enabled | GPLv3+ |
| printextensions | 13.0.3.4 | Enabled | GPLv3+ |
| queueprio | 15.0.10 | Enabled | GPLv3+ |
| queues | 15.0.33 | Enabled | GPLv2+ |
| queuestats | 15.0.3.33 | Enabled | Commercial |
| qxact_reports | 15.0.3.34 | Enabled | Commercial |
| recording_report | 15.0.4.34 | Enabled | Commercial |
| recordings | 15.0.3.15 | Enabled | GPLv3+ |
| restapps | 15.0.19.49 | Enabled | Commercial |
| ringgroups | 15.0.11.14 | Enabled | GPLv3+ |
| sangomaconnect | 15.0.25.5 | Enabled | Commercial |
| sangomacrm | 15.0.23.1 | Enabled | Commercial |
| setcid | 15.0.9 | Enabled | GPLv3+ |
| sipsettings | 15.0.6.39 | Enabled | AGPLv3+ |
| sipstation | 15.0.5.23 | Enabled | Commercial |
| sms | 15.0.18 | Enabled | Commercial |
| soundlang | 15.0.5.10 | Enabled | GPLv3+ |
| speeddial | 2.11.0.4 | Enabled | GPLv3+ |
| superfecta | 15.0.2.32 | Enabled | GPLv2+ |
| sysadmin | 15.0.21.72 | Enabled | Commercial |
| timeconditions | 15.0.15.10 | Enabled | GPLv3+ |
| tts | 15.0.11 | Enabled | GPLv3+ |
| ttsengines | 15.0.4.7 | Enabled | AGPLv3 |
| ucp | 15.0.6.29 | Enabled | AGPLv3+ |
| userman | 15.0.41 | Enabled | AGPLv3+ |
| vega | 15.0.11 | Enabled | Commercial+ |
| vmblast | 15.0.11.6 | Enabled | GPLv3+ |
| vmnotify | 15.0.12 | Enabled | Commercial |
| voicemail | 15.0.18.35 | Enabled | GPLv3+ |
| voicemail_report | 15.0.6 | Enabled | Commercial |
| vqplus | 15.0.7.22 | Enabled | Commercial |
| weakpasswords | 13.0.2 | Enabled | GPLv3+ |
| webcallback | 15.0.6.3 | Enabled | Commercial |
| webrtc | 15.0.10 | Enabled | GPLv3+ |
| xmpp | 15.0.6.9 | Enabled | AGPLv3 |
| zulu | 15.0.58.12 | Enabled | Commercial |
±---------------------±-----------±--------±------------+
I would certainly appreciate if anyone has any direction for me. I am glad to just put a workaround logrotate (or something else) in cron, but I’m not sure what to put because I don’t see any CPU-consuming run-away processes and I can’t run logrotate by hand.

Thanks! Dave

Start with

grep logrotate -r  /var/log/cron*

Here is the output:
/var/log/cron:Oct 19 03:48:02 freepbx run-parts(/etc/cron.daily)[7585]: finished logrotate
/var/log/cron-20211006:Oct 5 07:18:01 freepbx run-parts(/etc/cron.daily)[41087]: finished logrotate
/var/log/cron-20211006:Oct 6 07:32:01 freepbx run-parts(/etc/cron.daily)[8773]: starting logrotate
/var/log/cron-20211007:Oct 6 07:32:01 freepbx run-parts(/etc/cron.daily)[8796]: finished logrotate
/var/log/cron-20211007:Oct 7 07:06:01 freepbx run-parts(/etc/cron.daily)[51637]: starting logrotate
/var/log/cron-20211008:Oct 7 07:06:02 freepbx run-parts(/etc/cron.daily)[51679]: finished logrotate
/var/log/cron-20211008:Oct 8 03:22:01 freepbx run-parts(/etc/cron.daily)[111799]: starting logrotate
/var/log/cron-20211009:Oct 8 03:22:01 freepbx run-parts(/etc/cron.daily)[111817]: finished logrotate
/var/log/cron-20211009:Oct 9 03:25:01 freepbx run-parts(/etc/cron.daily)[69899]: starting logrotate
/var/log/cron-20211010:Oct 9 03:25:02 freepbx run-parts(/etc/cron.daily)[69936]: finished logrotate
/var/log/cron-20211010:Oct 10 03:20:01 freepbx run-parts(/etc/cron.daily)[217514]: starting logrotate
/var/log/cron-20211011:Oct 10 03:20:03 freepbx run-parts(/etc/cron.daily)[217606]: finished logrotate
/var/log/cron-20211011:Oct 11 03:24:01 freepbx run-parts(/etc/cron.daily)[120067]: starting logrotate
/var/log/cron-20211012:Oct 11 03:24:01 freepbx run-parts(/etc/cron.daily)[120085]: finished logrotate
/var/log/cron-20211012:Oct 12 03:28:01 freepbx run-parts(/etc/cron.daily)[36706]: starting logrotate
/var/log/cron-20211013:Oct 12 03:28:02 freepbx run-parts(/etc/cron.daily)[36756]: finished logrotate
/var/log/cron-20211013:Oct 13 03:07:02 freepbx run-parts(/etc/cron.daily)[198567]: starting logrotate
/var/log/cron-20211014:Oct 13 03:07:02 freepbx run-parts(/etc/cron.daily)[198587]: finished logrotate
/var/log/cron-20211014:Oct 14 03:32:01 freepbx run-parts(/etc/cron.daily)[118456]: starting logrotate
/var/log/cron-20211015:Oct 14 03:32:01 freepbx run-parts(/etc/cron.daily)[118481]: finished logrotate
/var/log/cron-20211015:Oct 15 03:25:01 freepbx run-parts(/etc/cron.daily)[123673]: starting logrotate
/var/log/cron-20211016:Oct 15 03:25:01 freepbx run-parts(/etc/cron.daily)[123690]: finished logrotate
/var/log/cron-20211016:Oct 16 03:20:01 freepbx run-parts(/etc/cron.daily)[39862]: starting logrotate
/var/log/cron-20211017:Oct 16 03:20:02 freepbx run-parts(/etc/cron.daily)[39905]: finished logrotate
/var/log/cron-20211017:Oct 17 03:50:01 freepbx run-parts(/etc/cron.daily)[192789]: starting logrotate
/var/log/cron-20211018:Oct 17 03:50:04 freepbx run-parts(/etc/cron.daily)[192843]: finished logrotate
/var/log/cron-20211018:Oct 18 03:10:01 freepbx run-parts(/etc/cron.daily)[90414]: starting logrotate
/var/log/cron-20211019:Oct 18 03:10:01 freepbx run-parts(/etc/cron.daily)[90436]: finished logrotate
/var/log/cron-20211019:Oct 19 03:48:01 freepbx run-parts(/etc/cron.daily)[7547]: starting logrotate

Not sure that I understand this. It looks like logrotate started & finished on the 16th, 17th, and 18th, yet the full log doesn’t show that it was rotated on those days:
[[email protected] ~]# ls -l /var/log/asterisk/full*
-rw-r----- 1 asterisk asterisk 71996993 Oct 19 12:58 /var/log/asterisk/full
-rw-r----- 1 asterisk asterisk 7112689 Oct 8 03:22 /var/log/asterisk/full-20211008
-rw-r----- 1 asterisk asterisk 24702273 Oct 9 03:25 /var/log/asterisk/full-20211009
-rw-r----- 1 asterisk asterisk 599871 Oct 10 03:20 /var/log/asterisk/full-20211010
-rw-r----- 1 asterisk asterisk 348038 Oct 11 03:24 /var/log/asterisk/full-20211011
-rw-r----- 1 asterisk asterisk 16249144 Oct 12 03:28 /var/log/asterisk/full-20211012
-rw-r----- 1 asterisk asterisk 18314454 Oct 13 03:07 /var/log/asterisk/full-20211013
-rw-r----- 1 asterisk asterisk 20116047 Oct 14 03:32 /var/log/asterisk/full-20211014

Thanks for your help!

So it seems like the asrerisk logs are not rotating,

grep asterisk -r  /etc/logrotate*
cat /etc/logrotate.d/asterisk

[[email protected] ~]# grep asterisk -r /etc/logrotate*
/etc/logrotate.d/asterisk:/var/log/asterisk/queue_log {
/etc/logrotate.d/asterisk: create 0640 asterisk asterisk
/etc/logrotate.d/asterisk: su asterisk asterisk
/etc/logrotate.d/asterisk:/var/spool/mail/asterisk {
/etc/logrotate.d/asterisk: create 0660 asterisk mail
/etc/logrotate.d/asterisk: su asterisk mail
/etc/logrotate.d/asterisk:/var/log/asterisk/messages
/etc/logrotate.d/asterisk:/var/log/asterisk/event_log
/etc/logrotate.d/asterisk:/var/log/asterisk/full
/etc/logrotate.d/asterisk:/var/log/asterisk/dtmf
/etc/logrotate.d/asterisk:/var/log/asterisk/fail2ban {
/etc/logrotate.d/asterisk: create 0640 asterisk asterisk
/etc/logrotate.d/asterisk: su asterisk asterisk
/etc/logrotate.d/asterisk: /usr/sbin/asterisk -rx ‘logger reload’ > /dev/null 2> /dev/null
/etc/logrotate.d/pms:/var/log/asterisk/pms.log {
/etc/logrotate.d/pms: create 0640 asterisk asterisk
/etc/logrotate.d/pms: su asterisk asterisk
/etc/logrotate.d/freepbx-core:/var/log/asterisk/freepbx_dbug {
/etc/logrotate.d/freepbx-core:create 0664 asterisk asterisk
/etc/logrotate.d/freepbx-core:su asterisk asterisk
/etc/logrotate.d/freepbx-core:/var/log/asterisk/freepbx_debug
/etc/logrotate.d/freepbx-core:/var/log/asterisk/freepbx.log
/etc/logrotate.d/freepbx-core:/var/log/asterisk/freepbx_security.log{
/etc/logrotate.d/freepbx-core:create 0664 asterisk asterisk
/etc/logrotate.d/freepbx-core:su asterisk asterisk
/etc/logrotate.d/freepbx-core:/var/log/asterisk/core-fastagi_.log {
/etc/logrotate.d/freepbx-core:create 0664 asterisk asterisk
/etc/logrotate.d/freepbx-core:su asterisk asterisk
/etc/logrotate.d/smartoffice:/var/log/asterisk/iot-server.log {
/etc/logrotate.d/smartoffice:create 0640 asterisk asterisk
/etc/logrotate.d/smartoffice:su asterisk asterisk
/etc/logrotate.d/freepbx-restapps:/var/log/asterisk/restapps_
.log{
/etc/logrotate.d/freepbx-restapps:create 0640 asterisk asterisk
/etc/logrotate.d/freepbx-restapps:su asterisk asterisk
/etc/logrotate.d/freepbx-restapps:/var/log/asterisk/dpmaapps.log{
/etc/logrotate.d/freepbx-restapps:create 0640 asterisk asterisk
/etc/logrotate.d/freepbx-restapps:su asterisk asterisk
/etc/logrotate.d/sangomaconnect:/var/log/asterisk/sangomaconnect.log {
/etc/logrotate.d/sangomaconnect:create 0640 asterisk asterisk
/etc/logrotate.d/sangomaconnect:su asterisk asterisk
/etc/logrotate.d/freepbx-sangomacrm:/var/log/asterisk/sangomacrm*.log{
/etc/logrotate.d/freepbx-sangomacrm:create 0640 asterisk asterisk
/etc/logrotate.d/freepbx-sangomacrm:su asterisk asterisk
/etc/logrotate.d/freepbx-zulu:/var/log/asterisk/zulu_.log {
/etc/logrotate.d/freepbx-zulu:create 0640 asterisk asterisk
/etc/logrotate.d/freepbx-zulu:su asterisk asterisk
/etc/logrotate.d/oc_logrotate:/var/log/asterisk/oracle_connector.log
/etc/logrotate.d/oc_logrotate:/var/log/asterisk/oracle_engine_err.log
/etc/logrotate.d/oc_logrotate:/var/log/asterisk/oracle_engine_out.log {
/etc/logrotate.d/oc_logrotate: create 0640 asterisk asterisk
/etc/logrotate.d/oc_logrotate: su asterisk asterisk
/etc/logrotate.d/freepbx-ucp:/var/log/asterisk/ucp_
.log {
/etc/logrotate.d/freepbx-ucp:create 0640 asterisk asterisk
/etc/logrotate.d/freepbx-ucp:su asterisk asterisk
/etc/logrotate.d/freepbx-qcallback:/var/log/asterisk/qcallback_*.log{
/etc/logrotate.d/freepbx-qcallback:create 0640 asterisk asterisk
/etc/logrotate.d/freepbx-qcallback:su asterisk asterisk
[[email protected] ~]# cat /etc/logrotate.d/asterisk
/var/log/asterisk/queue_log {
daily
missingok
rotate 30
notifempty
sharedscripts
create 0640 asterisk asterisk
su asterisk asterisk
}

/var/spool/mail/asterisk {
daily
missingok
rotate 7
notifempty
sharedscripts
create 0660 asterisk mail
su asterisk mail
}

/var/log/asterisk/messages
/var/log/asterisk/event_log
/var/log/asterisk/full
/var/log/asterisk/dtmf
/var/log/asterisk/fail2ban {
daily
missingok
rotate 7
notifempty
sharedscripts
create 0640 asterisk asterisk
su asterisk asterisk
postrotate
/usr/sbin/asterisk -rx ‘logger reload’ > /dev/null 2> /dev/null
endscript
}
#This comment is to fix rpm file replacing
#Config file built on Thu Apr 22 07:27:05 UTC 2021

Now force a verbose rotation

logrotate -vf /etc/logrotate.d/asterisk
ls -lsrt /var/log/asterisk

That did the trick - it forced a logrotate. But what is the underlying issue - how would I automate this fix?

[[email protected] ~]# logrotate -vf /etc/logrotate.d/asterisk
reading config file /etc/logrotate.d/asterisk
Allocating hash table for state file, size 15360 B

Handling 3 logs

rotating pattern: /var/log/asterisk/queue_log forced from command line (30 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/queue_log
log does not need rotating (log is empty)switching euid to 0 and egid to 0

rotating pattern: /var/spool/mail/asterisk forced from command line (7 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 12
considering log /var/spool/mail/asterisk
log does not need rotating (log is empty)switching euid to 0 and egid to 0

rotating pattern: /var/log/asterisk/messages
/var/log/asterisk/event_log
/var/log/asterisk/full
/var/log/asterisk/dtmf
/var/log/asterisk/fail2ban forced from command line (7 rotations)
empty log files are not rotated, old logs are removed
switching euid to 995 and egid to 995
considering log /var/log/asterisk/messages
log /var/log/asterisk/messages does not exist – skipping
considering log /var/log/asterisk/event_log
log /var/log/asterisk/event_log does not exist – skipping
considering log /var/log/asterisk/full
log needs rotating
considering log /var/log/asterisk/dtmf
log /var/log/asterisk/dtmf does not exist – skipping
considering log /var/log/asterisk/fail2ban
log needs rotating
rotating log /var/log/asterisk/full, log->rotateCount is 7
dateext suffix ‘-20211019’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
renaming /var/log/asterisk/full.7 to /var/log/asterisk/full.8 (rotatecount 7, logstart 1, i 7),
old log /var/log/asterisk/full.7 does not exist
renaming /var/log/asterisk/full.6 to /var/log/asterisk/full.7 (rotatecount 7, logstart 1, i 6),
old log /var/log/asterisk/full.6 does not exist
renaming /var/log/asterisk/full.5 to /var/log/asterisk/full.6 (rotatecount 7, logstart 1, i 5),
old log /var/log/asterisk/full.5 does not exist
renaming /var/log/asterisk/full.4 to /var/log/asterisk/full.5 (rotatecount 7, logstart 1, i 4),
old log /var/log/asterisk/full.4 does not exist
renaming /var/log/asterisk/full.3 to /var/log/asterisk/full.4 (rotatecount 7, logstart 1, i 3),
old log /var/log/asterisk/full.3 does not exist
renaming /var/log/asterisk/full.2 to /var/log/asterisk/full.3 (rotatecount 7, logstart 1, i 2),
old log /var/log/asterisk/full.2 does not exist
renaming /var/log/asterisk/full.1 to /var/log/asterisk/full.2 (rotatecount 7, logstart 1, i 1),
old log /var/log/asterisk/full.1 does not exist
renaming /var/log/asterisk/full.0 to /var/log/asterisk/full.1 (rotatecount 7, logstart 1, i 0),
old log /var/log/asterisk/full.0 does not exist
log /var/log/asterisk/full.8 doesn’t exist – won’t try to dispose of it
rotating log /var/log/asterisk/fail2ban, log->rotateCount is 7
dateext suffix ‘-20211019’
glob pattern ‘-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’
renaming /var/log/asterisk/fail2ban.7 to /var/log/asterisk/fail2ban.8 (rotatecount 7, logstart 1, i 7),
old log /var/log/asterisk/fail2ban.7 does not exist
renaming /var/log/asterisk/fail2ban.6 to /var/log/asterisk/fail2ban.7 (rotatecount 7, logstart 1, i 6),
old log /var/log/asterisk/fail2ban.6 does not exist
renaming /var/log/asterisk/fail2ban.5 to /var/log/asterisk/fail2ban.6 (rotatecount 7, logstart 1, i 5),
old log /var/log/asterisk/fail2ban.5 does not exist
renaming /var/log/asterisk/fail2ban.4 to /var/log/asterisk/fail2ban.5 (rotatecount 7, logstart 1, i 4),
old log /var/log/asterisk/fail2ban.4 does not exist
renaming /var/log/asterisk/fail2ban.3 to /var/log/asterisk/fail2ban.4 (rotatecount 7, logstart 1, i 3),
old log /var/log/asterisk/fail2ban.3 does not exist
renaming /var/log/asterisk/fail2ban.2 to /var/log/asterisk/fail2ban.3 (rotatecount 7, logstart 1, i 2),
old log /var/log/asterisk/fail2ban.2 does not exist
renaming /var/log/asterisk/fail2ban.1 to /var/log/asterisk/fail2ban.2 (rotatecount 7, logstart 1, i 1),
old log /var/log/asterisk/fail2ban.1 does not exist
renaming /var/log/asterisk/fail2ban.0 to /var/log/asterisk/fail2ban.1 (rotatecount 7, logstart 1, i 0),
log /var/log/asterisk/fail2ban.8 doesn’t exist – won’t try to dispose of it
renaming /var/log/asterisk/full to /var/log/asterisk/full.1
creating new /var/log/asterisk/full mode = 0640 uid = 995 gid = 995
renaming /var/log/asterisk/fail2ban to /var/log/asterisk/fail2ban.1
creating new /var/log/asterisk/fail2ban mode = 0640 uid = 995 gid = 995
running postrotate script
switching euid to 0 and egid to 0
switching euid to 0 and egid to 0
[[email protected] ~]# ls -lsrt /var/log/asterisk
total 3433516
0 drwxrwxr-x. 2 asterisk asterisk 6 Apr 22 03:27 cdr-custom
0 drwxrwxr-x. 2 asterisk asterisk 6 Apr 22 03:27 cdr-csv
0 -rw-rw-r–. 1 asterisk asterisk 0 Jun 10 11:30 core-fastagi_err.log
0 -rw-rw-r-- 1 asterisk asterisk 0 Jun 12 04:47 iot-server.log
0 -rw-rw-r-- 1 asterisk asterisk 0 Jun 17 13:03 restapps_err.log
44 -rw-rw-r-- 1 asterisk asterisk 43603 Jun 17 13:10 backup-eb4ad6fd-03af-4959-904e-9da37e14b706.log
44 -rw-rw-r-- 1 asterisk asterisk 43600 Jun 18 01:00 backup-d012811c-b6c5-440b-b564-0d9198bc0074.log
44 -rw-rw-r-- 1 asterisk asterisk 43603 Jun 19 01:00 backup-1f3c456d-90f8-44b3-aa6f-7cc94e055e1c.log
44 -rw-rw-r-- 1 asterisk asterisk 43603 Jun 20 01:00 backup-1b9115d9-3370-40e7-b1bc-d02b8a6fb913.log
44 -rw-rw-r-- 1 asterisk asterisk 43600 Jun 21 01:00 backup-25561418-512c-46c2-ba17-98db212568db.log
44 -rw-rw-r-- 1 asterisk asterisk 43600 Jun 22 01:00 backup-91ac09ca-0aba-483f-bebb-1799292740c7.log
44 -rw-rw-r-- 1 asterisk asterisk 43600 Jun 23 01:00 backup-a3b560f8-69f3-417d-a9f8-34fbbab7960d.log
44 -rw-rw-r-- 1 asterisk asterisk 43603 Jun 24 01:00 backup-c81ef5ac-3ce1-4ba2-a0af-b554df36062c.log
44 -rw-rw-r-- 1 asterisk asterisk 43603 Jun 25 01:00 backup-5daf82c0-a823-4444-9fc9-f7f7a343beb9.log
44 -rw-rw-r-- 1 asterisk asterisk 43882 Jun 26 01:00 backup-451c3cec-cf2e-47b4-abed-3affa505e55b.log
44 -rw-rw-r-- 1 asterisk asterisk 43743 Jun 27 01:00 backup-f32d7c23-e165-4aa5-b877-6900e2f77f18.log
44 -rw-rw-r-- 1 asterisk asterisk 43743 Jun 28 01:00 backup-455d7243-9a6d-447f-af45-1d24023bd44b.log
44 -rw-rw-r-- 1 asterisk asterisk 43739 Jun 29 01:00 backup-7ee796e0-58ef-4eb5-94b5-656b522cb119.log
44 -rw-rw-r-- 1 asterisk asterisk 43739 Jun 30 01:00 backup-9477eddf-2118-42ee-be52-2410346c90eb.log
44 -rw-rw-r-- 1 asterisk asterisk 43739 Jul 1 01:00 backup-6b7001b4-f735-488f-b365-0dcbe8363b98.log
44 -rw-rw-r-- 1 asterisk asterisk 43743 Jul 2 01:00 backup-25422145-62b7-4a3c-87a0-951ce9be3078.log
44 -rw-rw-r-- 1 asterisk asterisk 43740 Jul 3 01:00 backup-c9d433f5-a7fe-4445-ac4b-172dc22bc9e7.log
44 -rw-rw-r-- 1 asterisk asterisk 43743 Jul 4 01:00 backup-bf24289c-7514-4b3a-9fb1-bcd258c2042f.log
44 -rw-rw-r-- 1 asterisk asterisk 43740 Jul 5 01:00 backup-ef62917c-c552-4f08-8442-15c35131590b.log
44 -rw-rw-r-- 1 asterisk asterisk 43740 Jul 6 01:00 backup-9be45ec5-b49c-4061-9dd3-85668e2cc2c0.log
44 -rw-rw-r-- 1 asterisk asterisk 43742 Jul 7 01:00 backup-e8cbf306-5f33-4b3f-a82a-a7232328c36b.log
44 -rw-rw-r-- 1 asterisk asterisk 43742 Jul 8 01:00 backup-ce6e291a-bb1a-4a9a-9b3a-d01d8a56054c.log
44 -rw-rw-r-- 1 asterisk asterisk 43742 Jul 9 01:00 backup-39a6f4ec-850b-482c-bb20-a7e347b7a14f.log
44 -rw-rw-r-- 1 asterisk asterisk 43743 Jul 10 01:00 backup-d6c8478a-6a60-47dd-9327-cba8017fcfea.log
44 -rw-rw-r-- 1 asterisk asterisk 43742 Jul 11 01:00 backup-f1da6f99-c9b8-4a84-aa4f-857958407aa4.log
44 -rw-rw-r-- 1 asterisk asterisk 43740 Jul 12 01:00 backup-71e25e24-9b73-4e21-9b7f-f80acac74557.log
4 -rw-rw-r-- 1 asterisk asterisk 2893 Jul 12 13:58 firewall.log
44 -rw-rw-r-- 1 asterisk asterisk 43312 Jul 13 01:00 backup-05a04ec7-f685-4480-a438-851a2ba2a7e0.log
44 -rw-rw-r-- 1 asterisk asterisk 43312 Jul 14 01:00 backup-3c7d9700-ea75-4994-976c-1bfc8c8cfa6a.log
48 -rw-rw-r-- 1 asterisk asterisk 47937 Jul 15 01:00 backup-554e08cd-4454-4720-9290-4a10b5107d52.log
48 -rw-rw-r-- 1 asterisk asterisk 48270 Jul 16 01:00 backup-2cc67dfd-6b54-4fe5-a418-afcbc71374ae.log
48 -rw-rw-r-- 1 asterisk asterisk 48270 Jul 17 01:00 backup-32cb05b7-5482-4b97-88e0-824704fccabd.log
48 -rw-rw-r-- 1 asterisk asterisk 48267 Jul 18 01:00 backup-98d31b39-20ee-4e37-a133-3539951ba912.log
48 -rw-rw-r-- 1 asterisk asterisk 48270 Jul 19 01:00 backup-3cfb33b8-1c03-4d16-81d7-319ea90e8a4a.log
48 -rw-rw-r-- 1 asterisk asterisk 48266 Jul 20 01:00 backup-3ffe9c96-9e31-46c4-abb5-a95f50261c0a.log
48 -rw-rw-r-- 1 asterisk asterisk 48269 Jul 21 01:00 backup-29698336-814e-4f93-bcab-15be009c5463.log
48 -rw-rw-r-- 1 asterisk asterisk 48269 Jul 22 01:00 backup-494de49f-f6e8-4e40-9444-2f6c4c9d73b0.log
48 -rw-rw-r-- 1 asterisk asterisk 48269 Jul 23 01:00 backup-6244a532-b735-47be-85c1-20e8bed8948f.log
48 -rw-rw-r-- 1 asterisk asterisk 48267 Jul 24 01:00 backup-d94482ff-9ea9-4a92-a5cd-b6baf8a8e9e9.log
48 -rw-rw-r-- 1 asterisk asterisk 48267 Jul 25 01:00 backup-abbfb0e7-2ef8-47ea-857f-79df442d37a4.log
48 -rw-rw-r-- 1 asterisk asterisk 48266 Jul 26 01:00 backup-d2cd87a6-ad0b-4fbe-8c7d-ac42a314aa73.log
48 -rw-rw-r-- 1 asterisk asterisk 48270 Jul 27 01:00 backup-9ffb6450-9abe-4edc-b3b0-adeab15429e1.log
48 -rw-rw-r-- 1 asterisk asterisk 48269 Jul 28 01:00 backup-3e55754a-0144-4c19-959c-80f469ea831e.log
48 -rw-rw-r-- 1 asterisk asterisk 48270 Jul 29 01:00 backup-56d915d9-f37d-4200-af89-8f8b5f522c0a.log
48 -rw-rw-r-- 1 asterisk asterisk 48270 Jul 30 01:00 backup-844a9a58-dd95-4108-ba3b-b4d48690203a.log
0 -rw-rw-r-- 1 asterisk asterisk 0 Jul 30 07:44 adv_recovery.log
0 -rw-rw-r-- 1 asterisk asterisk 0 Jul 30 08:06 recording_report
48 -rw-rw-r-- 1 asterisk asterisk 48270 Jul 31 01:00 backup-48940119-cbab-4536-810c-91b19465e90a.log
48 -rw-rw-r-- 1 asterisk asterisk 48269 Aug 1 01:00 backup-0f1a95e5-efb8-4e1c-b6da-431eafb51038.log
48 -rw-rw-r-- 1 asterisk asterisk 48269 Aug 2 01:00 backup-f660a338-712c-4c7f-a9b4-d8d3343a2536.log
48 -rw-rw-r-- 1 asterisk asterisk 48269 Aug 3 01:00 backup-e22b4457-ef76-4fa1-a4de-ecc90089fa1d.log
48 -rw-rw-r-- 1 asterisk asterisk 48264 Aug 4 01:00 backup-d497e9b6-f01a-4427-8598-609d4d45a9bc.log
48 -rw-rw-r-- 1 asterisk asterisk 48267 Aug 5 01:00 backup-fc587fe0-3631-4727-b8fb-dee72fd43c29.log
48 -rw-rw-r-- 1 asterisk asterisk 48592 Aug 6 01:00 backup-b037cd3c-c318-4de8-9c1a-84de679b47fd.log
48 -rw-rw-r-- 1 asterisk asterisk 48264 Aug 7 01:00 backup-11f4dd94-b31e-4d80-a541-cd5d37d6677a.log
48 -rw-rw-r-- 1 asterisk asterisk 48270 Aug 8 01:00 backup-559dbcc8-45ea-4757-a419-95c2fd13d314.log
48 -rw-rw-r-- 1 asterisk asterisk 48270 Aug 9 01:00 backup-37789928-b910-4bf6-98ef-790f3d5ac840.log
4 -rw-rw-r-- 1 asterisk asterisk 200 Aug 9 14:13 queue_log-20210810
132 -rw-rw-r-- 1 asterisk asterisk 134136 Aug 10 01:00 backup-16283fe0-131f-4ece-9ead-6582a03d2963.log
4 -rw-rw-r-- 1 asterisk asterisk 160 Aug 10 15:57 queue_log-20210811
132 -rw-rw-r-- 1 asterisk asterisk 134136 Aug 11 01:00 backup-624f49f3-04ce-4394-acda-feff7f421bb7.log
4 -rw-rw-r-- 1 asterisk asterisk 40 Aug 11 07:40 queue_log-20210812
132 -rw-rw-r-- 1 asterisk asterisk 134134 Aug 12 01:00 backup-a58db25c-277b-4402-8edd-042f964399b9.log
4 -rw-rw-r-- 1 asterisk asterisk 40 Aug 12 07:06 queue_log-20210813
132 -rw-rw-r-- 1 asterisk asterisk 134132 Aug 13 01:00 backup-fa4fbed0-2cbb-4499-9464-b393ca1c12ef.log
4 -rw-rw-r-- 1 asterisk asterisk 240 Aug 13 11:47 queue_log-20210814
132 -rw-rw-r-- 1 asterisk asterisk 134136 Aug 14 01:00 backup-49c81d7c-c9c4-4fc9-862f-29bd7f55e492.log
132 -rw-rw-r-- 1 asterisk asterisk 134134 Aug 15 01:00 backup-1af447c7-56b2-466a-b699-218382b30ccc.log
132 -rw-rw-r-- 1 asterisk asterisk 134133 Aug 16 01:00 backup-df77a7c9-3f5b-49c0-881e-a597182dac71.log
4 -rw-rw-r-- 1 asterisk asterisk 40 Aug 16 07:02 queue_log-20210817
132 -rw-rw-r-- 1 asterisk asterisk 134136 Aug 17 01:00 backup-41e8c2a0-d3ca-457e-914e-9c51e866517c.log
132 -rw-rw-r-- 1 asterisk asterisk 134133 Aug 18 01:00 backup-be66cd93-337a-4391-afda-c91c08cc7147.log
132 -rw-rw-r-- 1 asterisk asterisk 134136 Aug 19 01:00 backup-b55af4e2-e0ed-4541-a50b-ed9c459e4b30.log
132 -rw-rw-r-- 1 asterisk asterisk 134136 Aug 20 01:00 backup-94a8ea55-d04d-48ab-948b-ac80b3f52ee5.log
132 -rw-rw-r-- 1 asterisk asterisk 134135 Aug 21 01:00 backup-f4c8fbcc-c89a-40b9-9752-056b60e742c6.log
132 -rw-rw-r-- 1 asterisk asterisk 134133 Aug 22 01:00 backup-46b8c59f-453c-4b0e-9875-46fe90c5ffa7.log
132 -rw-rw-r-- 1 asterisk asterisk 134133 Aug 23 01:00 backup-d7f20dd8-8bdc-4284-903a-1d5c15b85712.log
132 -rw-rw-r-- 1 asterisk asterisk 134135 Aug 24 01:00 backup-7fe4e17c-eec4-4ce0-972a-2bdc13167155.log
111684 -rw-rw-r-- 1 asterisk asterisk 114356868 Aug 24 03:33 freepbx.log-20210824
132 -rw-rw-r-- 1 asterisk asterisk 134136 Aug 25 01:00 backup-85780ada-096d-454a-8c47-ea000b4acdc0.log
132 -rw-rw-r-- 1 asterisk asterisk 134776 Aug 26 01:00 backup-299852e4-780a-4b21-b102-20a414ba3332.log
4 -rw-rw-r-- 1 asterisk asterisk 640 Aug 26 11:31 queue_log-20210827
68 -rw-rw-r-- 1 asterisk asterisk 69091 Aug 27 01:00 backup-eb9fab5e-ec8a-4ff7-9f8e-822cad79cdcf.log
4 -rw-rw-r-- 1 asterisk asterisk 80 Aug 27 15:31 queue_log-20210828
72 -rw-rw-r-- 1 asterisk asterisk 71663 Aug 28 01:00 backup-f32d72c3-08df-4d60-b928-e0da2af0c05a.log
72 -rw-rw-r-- 1 asterisk asterisk 71666 Aug 29 01:00 backup-0face913-8752-46d5-a847-e630a999664b.log
72 -rw-rw-r-- 1 asterisk asterisk 71662 Aug 30 01:00 backup-c2609edc-9db9-4bdc-b9cc-c431185c281f.log
4 -rw-rw-r-- 1 asterisk asterisk 200 Aug 30 15:23 queue_log-20210831
72 -rw-rw-r-- 1 asterisk asterisk 72302 Aug 31 01:00 backup-89434280-af1f-4bb9-bd8b-e99209c628b9.log
4 -rw-rw-r-- 1 asterisk asterisk 40 Aug 31 07:18 queue_log-20210901
72 -rw-rw-r-- 1 asterisk asterisk 71011 Sep 1 01:00 backup-2a163b25-f103-49db-ad25-b1dd1d7ee90f.log
4 -rw-rw-r-- 1 asterisk asterisk 160 Sep 1 13:14 queue_log-20210902
72 -rw-rw-r-- 1 asterisk asterisk 72290 Sep 2 01:00 backup-6de1752c-2129-435a-b5ae-cf641e0686cd.log
4 -rw-rw-r-- 1 asterisk asterisk 200 Sep 2 08:36 queue_log-20210903
76 -rw-rw-r-- 1 asterisk asterisk 73895 Sep 3 01:00 backup-61f564b2-a0be-48a6-86d3-d7bd1deda190.log
105128 -rw-rw-r-- 1 asterisk asterisk 107646427 Sep 3 03:26 freepbx.log-20210903
76 -rw-rw-r-- 1 asterisk asterisk 75501 Sep 4 01:00 backup-859afd71-c0ba-4ab3-b1ab-15615097636b.log
76 -rw-rw-r-- 1 asterisk asterisk 75498 Sep 5 01:00 backup-ceda8341-9cbf-4d56-921a-53bb483bab3c.log
76 -rw-rw-r-- 1 asterisk asterisk 75499 Sep 6 01:00 backup-2040faa8-7ea9-49e7-b8bc-d0787ce34a1a.log
76 -rw-rw-r-- 1 asterisk asterisk 76145 Sep 7 01:00 backup-4d48b318-7de5-405d-be9d-15980a34b630.log
4 -rw-rw-r-- 1 asterisk asterisk 40 Sep 7 15:48 queue_log-20210908
76 -rw-rw-r-- 1 asterisk asterisk 74849 Sep 8 01:00 backup-6acffd29-0058-4f2d-ba44-493a998b29e6.log
76 -rw-rw-r-- 1 asterisk asterisk 76137 Sep 9 01:00 backup-ab28e857-23cb-4ec3-9594-94e95237fd09.log
76 -rw-rw-r-- 1 asterisk asterisk 77748 Sep 10 01:00 backup-f002a3ce-63a6-4c47-b416-0bd99be2cc4d.log
76 -rw-rw-r-- 1 asterisk asterisk 76771 Sep 11 01:00 backup-5cefb409-a5c7-45e7-aa3e-2b07c7d12fa9.log
76 -rw-rw-r-- 1 asterisk asterisk 76774 Sep 12 01:00 backup-539dcb6c-6c3c-486f-b8aa-cbdeccc44475.log
76 -rw-rw-r-- 1 asterisk asterisk 76770 Sep 13 01:00 backup-caf4acbb-af6e-491c-a99f-97accc7d0e92.log
76 -rw-rw-r-- 1 asterisk asterisk 77091 Sep 14 01:00 backup-c211c86d-aa82-4891-9f27-7405a6b9dcde.log
109680 -rw-rw-r-- 1 asterisk asterisk 112307421 Sep 14 03:11 freepbx.log-20210914
76 -rw-rw-r-- 1 asterisk asterisk 77736 Sep 15 01:00 backup-1a49b968-dd4d-4b49-ab82-3c1a20806727.log
4 -rw-rw-r-- 1 asterisk asterisk 40 Sep 15 09:27 queue_log-20210916
80 -rw-rw-r-- 1 asterisk asterisk 79661 Sep 16 01:00 backup-0f1480a1-01b5-4cb8-81b9-22c83d797795.log
80 -rw-rw-r-- 1 asterisk asterisk 81914 Sep 17 01:00 backup-e6c3d1e3-8cf4-453a-98fb-5941841f7b72.log
84 -rw-rw-r-- 1 asterisk asterisk 83521 Sep 18 01:00 backup-2feebd16-1d7d-46c9-96f2-0710ebea473c.log
84 -rw-rw-r-- 1 asterisk asterisk 83523 Sep 19 01:00 backup-bfad6e51-aace-4d60-96b7-1c543a2184da.log
84 -rw-rw-r-- 1 asterisk asterisk 83521 Sep 20 01:00 backup-217de697-38b5-40aa-b010-b319f633ed7b.log
80 -rw-rw-r-- 1 asterisk asterisk 80292 Sep 21 01:00 backup-1a09c8c6-ffaf-4623-ba3a-d79d32bec485.log
80 -rw-rw-r-- 1 asterisk asterisk 81898 Sep 22 01:00 backup-1259e60c-5b94-4c1b-90f4-f8fba2093d22.log
80 -rw-rw-r-- 1 asterisk asterisk 79000 Sep 23 01:00 backup-27ec6827-b850-4ed5-b09c-2d94f93c41cd.log
80 -rw-rw-r-- 1 asterisk asterisk 80280 Sep 24 01:00 backup-78f41d9e-d1d5-496c-b957-aff977fc1dba.log
80 -rw-rw-r-- 1 asterisk asterisk 79959 Sep 25 01:00 backup-5a4a7367-fddf-4e34-9425-f67e18929a17.log
110444 -rw-rw-r-- 1 asterisk asterisk 113087280 Sep 25 03:39 freepbx.log-20210925
80 -rw-rw-r-- 1 asterisk asterisk 80280 Sep 26 01:00 backup-d2f28c14-51cc-4798-919a-832406093f79.log
80 -rw-rw-r-- 1 asterisk asterisk 80281 Sep 27 01:00 backup-22a0842a-8ad1-4ff7-a9ae-86e97642a044.log
4 -rw-rw-r-- 1 asterisk asterisk 40 Sep 27 08:23 queue_log-20210928
80 -rw-rw-r-- 1 asterisk asterisk 81559 Sep 28 01:00 backup-85245aea-d46a-47c0-af22-42b1749b8339.log
84 -rw-rw-r-- 1 asterisk asterisk 82836 Sep 29 01:00 backup-427e41d2-508f-472d-9dd5-02fd0fcdce18.log
4 -rw-rw-r-- 1 asterisk asterisk 40 Sep 29 09:32 queue_log-20210930
84 -rw-rw-r-- 1 asterisk asterisk 83799 Sep 30 01:00 backup-c73311b2-fe80-4ab8-948a-8e34c5dcb847.log
4 -rw-rw-r-- 1 asterisk asterisk 80 Sep 30 08:03 queue_log-20211001
84 -rw-rw-r-- 1 asterisk asterisk 84109 Oct 1 01:00 backup-0974f829-55f0-419a-b492-cfcf88da62ca.log
88 -rw-rw-r-- 1 asterisk asterisk 86032 Oct 2 01:00 backup-b3be0131-8048-4441-bee2-563e636da036.log
88 -rw-rw-r-- 1 asterisk asterisk 86032 Oct 3 01:00 backup-86cbe795-179d-4798-b857-417f1aaab198.log
88 -rw-rw-r-- 1 asterisk asterisk 86032 Oct 4 01:00 backup-38041f18-1059-4116-b10e-1f9357d0adfa.log
4 -rw-rw-r-- 1 asterisk asterisk 440 Oct 4 15:11 queue_log-20211005
4 -rw-rw-r-- 1 asterisk asterisk 60 Oct 5 00:00 pms.log-20211005
1988 -rw-rw-r-- 1 asterisk asterisk 2033060 Oct 5 01:07 backup-81c0c80e-7f70-4136-b152-460a472478cb.log
105804 -rw-rw-r-- 1 asterisk asterisk 108337806 Oct 5 03:17 freepbx.log-20211005
4 -rw-rw-r-- 1 asterisk asterisk 960 Oct 5 15:07 queue_log-20211006
4 -rw-rw-r-- 1 asterisk asterisk 60 Oct 6 00:00 pms.log-20211006
1968 -rw-rw-r-- 1 asterisk asterisk 2015006 Oct 6 01:07 backup-995a36bd-76d9-4285-b6e7-040eba0a44b3.log
4 -rw-rw-r-- 1 asterisk asterisk 360 Oct 6 09:20 queue_log-20211007
12 -rw-rw-r-- 1 asterisk asterisk 9750 Oct 6 09:47 freepbx_security.log-20211007
4 -rw-rw-r-- 1 asterisk asterisk 60 Oct 7 00:00 pms.log-20211007
1632 -rw-rw-r-- 1 asterisk asterisk 1667365 Oct 7 01:05 backup-c7edf681-d984-4085-ac99-3665fa11b14b.log
52 -rw-rw-r-- 1 asterisk asterisk 51093 Oct 7 09:47 ucp_err.log-202110071633621857
284 -rw-rw-r-- 1 asterisk asterisk 284748 Oct 7 09:47 ucp_out.log-202110071633621857
36 -rw-rw-r-- 1 asterisk asterisk 34884 Oct 7 11:34 restapps_out.log-20211007
51472 -rw-rw-r-- 1 asterisk asterisk 52700846 Oct 7 11:50 freepbx.log-20211007
26652 -rw-rw-r–. 1 asterisk asterisk 27284630 Oct 7 11:50 core-fastagi_out.log-20211007
4 -rw-rw-r-- 1 asterisk asterisk 2604 Oct 7 12:20 ucp_err.log-202110071633624301
12 -rw-rw-r-- 1 asterisk asterisk 11113 Oct 7 12:20 xmpp_err.log
0 -rw-rw-r-- 1 asterisk asterisk 0 Oct 7 12:21 zulu_out.log
4 -rw-rw-r-- 1 asterisk asterisk 1403 Oct 7 12:21 ucp_out.log-202110071633624301
8 -rw-rw-r-- 1 asterisk asterisk 7722 Oct 7 12:21 xmpp_out.log
455608 --w------T 1 asterisk asterisk 466535400 Oct 7 12:31 fail2ban-20211007
4 -rw-rw-r-- 1 asterisk asterisk 398 Oct 7 12:31 queue_log-20211008
4 -rw-rw-r-- 1 asterisk asterisk 60 Oct 8 00:00 pms.log-20211008
1636 -rw-r–r-- 1 asterisk asterisk 1671216 Oct 8 01:05 backup-e222f33d-3cc2-4287-b803-a2c1de2bcc00.log
74848 -rw-r----- 1 asterisk asterisk 76642812 Oct 8 03:22 fail2ban-20211008
6948 -rw-r----- 1 asterisk asterisk 7112689 Oct 8 03:22 full-20211008
4 -rw-r----- 1 asterisk asterisk 577 Oct 8 13:40 queue_log-20211009
4 -rw-r----- 1 asterisk asterisk 60 Oct 9 00:00 pms.log-20211009
1636 -rw-r–r-- 1 asterisk asterisk 1673749 Oct 9 01:05 backup-61b21634-67ad-499c-8429-b3d245b1c4e4.log
123900 -rw-r----- 1 asterisk asterisk 126870328 Oct 9 03:25 fail2ban-20211009
4 -rw-r----- 1 asterisk asterisk 40 Oct 9 03:25 queue_log-20211010
24124 -rw-r----- 1 asterisk asterisk 24702273 Oct 9 03:25 full-20211009
4 -rw-r----- 1 asterisk asterisk 60 Oct 10 00:00 pms.log-20211010
1636 -rw-r–r-- 1 asterisk asterisk 1673749 Oct 10 01:05 backup-096ba9fe-4992-43d5-84f2-f8073218f63e.log
121924 -rw-r----- 1 asterisk asterisk 124846913 Oct 10 03:20 fail2ban-20211010
4 -rw-r----- 1 asterisk asterisk 40 Oct 10 03:20 queue_log-20211011
588 -rw-r----- 1 asterisk asterisk 599871 Oct 10 03:20 full-20211010
4 -rw-r----- 1 asterisk asterisk 60 Oct 11 00:00 pms.log-20211011
1636 -rw-r–r-- 1 asterisk asterisk 1674071 Oct 11 01:05 backup-9df31ac6-b247-4acf-b8e7-0f43e2ac61bf.log
122672 -rw-r----- 1 asterisk asterisk 125615344 Oct 11 03:24 fail2ban-20211011
340 -rw-r----- 1 asterisk asterisk 348038 Oct 11 03:24 full-20211011
4 -rw-r----- 1 asterisk asterisk 160 Oct 11 15:08 queue_log-20211012
4 -rw-r----- 1 asterisk asterisk 60 Oct 12 00:00 pms.log-20211012
1640 -rw-r–r-- 1 asterisk asterisk 1678885 Oct 12 01:05 backup-772bb85f-03b1-4b9f-8971-78ad0ac2ced5.log
124384 -rw-r----- 1 asterisk asterisk 127367245 Oct 12 03:28 fail2ban-20211012
15876 -rw-r----- 1 asterisk asterisk 16249144 Oct 12 03:28 full-20211012
4 -rw-r----- 1 asterisk asterisk 80 Oct 12 09:37 queue_log-20211013
4 -rw-r----- 1 asterisk asterisk 60 Oct 13 00:00 pms.log-20211013
1644 -rw-r–r-- 1 asterisk asterisk 1682395 Oct 13 01:05 backup-e93f0b58-d481-415e-b75e-7ba10fa6b043.log
122568 -rw-r----- 1 asterisk asterisk 125505835 Oct 13 03:07 fail2ban-20211013
17892 -rw-r----- 1 asterisk asterisk 18314454 Oct 13 03:07 full-20211013
4 -rw-r----- 1 asterisk asterisk 520 Oct 13 15:49 queue_log-20211014
4 -rw-r----- 1 asterisk asterisk 60 Oct 14 00:00 pms.log-20211014
1648 -rw-r–r-- 1 asterisk asterisk 1685601 Oct 14 01:05 backup-6b7eb866-8bea-4410-b763-6c01fff4efa7.log
126816 -rw-r----- 1 asterisk asterisk 129856109 Oct 14 03:32 fail2ban-20211014
19648 -rw-r----- 1 asterisk asterisk 20116047 Oct 14 03:32 full-20211014
4 -rw-r----- 1 asterisk asterisk 1200 Oct 14 15:40 queue_log-20211015
4 -rw-r----- 1 asterisk asterisk 60 Oct 15 00:00 pms.log-20211015
1652 -rw-r–r-- 1 asterisk asterisk 1688247 Oct 15 01:05 backup-ade3a57f-8ca0-4a7d-90be-e3ec903284c5.log
4 -rw-r----- 1 asterisk asterisk 360 Oct 15 15:52 queue_log-20211016
4 -rw-r----- 1 asterisk asterisk 60 Oct 16 00:00 pms.log-20211016
1648 -rw-r–r-- 1 asterisk asterisk 1684953 Oct 16 01:05 backup-4bd3d66b-e311-449d-9742-0881741fdde0.log
4 -rw-r----- 1 asterisk asterisk 60 Oct 17 00:00 pms.log-20211017
1648 -rw-r–r-- 1 asterisk asterisk 1685597 Oct 17 01:05 backup-2916fc1e-a4ec-424b-a266-b790cac5daa7.log
110244 -rw-rw-r-- 1 asterisk asterisk 112882614 Oct 17 03:50 freepbx.log-20211017
40 -rw-rw-r-- 1 asterisk asterisk 38707 Oct 17 06:01 restapps.log
4 -rw-r----- 1 asterisk asterisk 60 Oct 18 00:00 pms.log-20211018
1648 -rw-r–r-- 1 asterisk asterisk 1686191 Oct 18 01:05 backup-a5ce68b6-8d8c-48b9-af50-acc2734d14f1.log
4 --w–wx–T 1 asterisk asterisk 2347 Oct 18 09:24 freepbx_security.log
12 -rw-rw-r-- 1 asterisk asterisk 10837 Oct 18 11:30 restapps_out.log
4 -rw-r----- 1 asterisk asterisk 220 Oct 18 12:24 queue_log-20211019
4 -rw-r----- 1 asterisk asterisk 60 Oct 19 00:00 pms.log-20211019
1648 -rw-r–r-- 1 asterisk asterisk 1685204 Oct 19 01:05 backup-b504df3b-75a4-4ae8-a3b9-32be7bed05a3.log
0 -rw-r----- 1 asterisk asterisk 0 Oct 19 03:48 pms.log
8 -rw-r----- 1 asterisk asterisk 4480 Oct 19 09:24 ucp_err.log
28 -rw-r----- 1 asterisk asterisk 26509 Oct 19 09:24 ucp_out.log
26436 -rw-rw-r-- 1 asterisk asterisk 24996770 Oct 19 13:36 freepbx.log
1172096 -rw-r----- 1 asterisk asterisk 693917111 Oct 19 13:36 fail2ban.1
4 -rw-r----- 1 asterisk asterisk 40 Oct 19 13:36 queue_log
87748 -rw-r----- 1 asterisk asterisk 73806719 Oct 19 13:36 full.1
24004 -rw-rw-r-- 1 asterisk asterisk 24554132 Oct 19 13:36 core-fastagi_out.log
192 -rw-r----- 1 asterisk asterisk 106334 Oct 19 13:36 full
16 -rw-r----- 1 asterisk asterisk 13542 Oct 19 13:36 fail2ban
[[email protected] ~]# ls -l /var/log/asterisk/full*
-rw-r----- 1 asterisk asterisk 170016 Oct 19 13:37 /var/log/asterisk/full
-rw-r----- 1 asterisk asterisk 73806719 Oct 19 13:36 /var/log/asterisk/full.1
-rw-r----- 1 asterisk asterisk 7112689 Oct 8 03:22 /var/log/asterisk/full-20211008
-rw-r----- 1 asterisk asterisk 24702273 Oct 9 03:25 /var/log/asterisk/full-20211009
-rw-r----- 1 asterisk asterisk 599871 Oct 10 03:20 /var/log/asterisk/full-20211010
-rw-r----- 1 asterisk asterisk 348038 Oct 11 03:24 /var/log/asterisk/full-20211011
-rw-r----- 1 asterisk asterisk 16249144 Oct 12 03:28 /var/log/asterisk/full-20211012
-rw-r----- 1 asterisk asterisk 18314454 Oct 13 03:07 /var/log/asterisk/full-20211013
-rw-r----- 1 asterisk asterisk 20116047 Oct 14 03:32 /var/log/asterisk/full-20211014

Not fixed, just ‘worked around’, now

ls -lsrt /etc/cron.daily
cat  /etc/cron.daily/logrotate

[[email protected] ~]# ls -lsrt /etc/cron.daily
total 12
4 -rwx------. 1 root root 208 Apr 10 2018 mlocate
4 -rwxr-xr-x. 1 root root 618 Oct 30 2018 man-db.cron
4 -rwx------. 1 root root 219 Mar 31 2020 logrotate
[[email protected] ~]# cat /etc/cron.daily/logrotate
#!/bin/sh

/usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate “ALERT exited abnormally with [$EXITVALUE]”
fi
exit 0

Can the ‘state file’ be written to the /var/lib/logrotate/ directory ?

ls -l /var/lib/logrotate*

[[email protected] ~]# ls -l /var/lib/logrotate*
total 4
-rw-r–r-- 1 root root 2746 Oct 19 13:36 logrotate.status

Then the answer is no, try

mkdir /var/lib/logrotate

mkdir /var/lib/logrotate

(yeh, twice)

[[email protected] ~]# mkdir /var/lib/logrotate
mkdir: cannot create directory ‘/var/lib/logrotate’: File exists
[[email protected] ~]# mkdir /var/lib/logrotate
mkdir: cannot create directory ‘/var/lib/logrotate’: File exists
[[email protected] ~]# ls -ld /var/lib/logrotate
drwxr-xr-x. 2 root root 30 Oct 19 13:36 /var/lib/logrotate

cat /var/lib/logrotate.status
cat /var/lib/logrotate/logrotate.status

[[email protected] ~]# cat /var/lib/logrotate.status
cat: /var/lib/logrotate.status: No such file or directory
[[email protected] ~]# cat /var/lib/logrotate/logrotate.status
logrotate state – version 2
“/var/log/asterisk/dtmf” 2021-6-10-20:0:0
“/var/log/radius/sqltrace.sql” 2021-6-10-20:0:0
“/var/log/mongodb/mongod.log” 2021-10-17-3:50:1
“/var/spool/mail/asterisk” 2021-10-19-3:48:1
“/var/log/asterisk/restapps_err.log” 2021-6-18-3:0:0
“/var/log/asterisk/ucp_out.log” 2021-10-7-12:31:41
“/var/log/radius/radacct//detail" 2021-6-10-20:0:0
“/var/log/asterisk/pms.log” 2021-10-19-3:48:1
“/var/log/yum.log” 2021-10-7-11:50:57
“/var/log/asterisk/iot-server.log” 2021-6-13-3:0:0
“/var/log/asterisk/sangomaconnect.log” 2021-6-13-3:0:0
“/var/log/asterisk/messages” 2021-6-10-20:0:0
“/var/log/httpd/ssl_access_log” 2021-10-8-3:22:1
“/var/log/asterisk/full” 2021-10-19-13:36:38
“/var/log/radius/radwtmp” 2021-6-10-20:0:0
“/var/log/asterisk/freepbx_debug” 2021-6-13-3:0:0
“/var/log/apcupsd.events” 2021-6-10-20:0:0
“/var/log/boot.log” 2021-10-7-12:31:41
“/var/log/asterisk/ucp_err.log” 2021-10-7-12:31:41
“/var/log/redis/redis.log” 2021-10-17-3:50:1
“/var/log/asterisk/queue_log” 2021-10-19-3:48:1
"/var/log/asterisk/sangomacrm
.log” 2021-7-13-3:0:0
“/var/log/httpd/error_log” 2021-10-19-3:48:1
“/var/log/asterisk/dpmaapps.log” 2021-7-31-3:0:0
“/var/log/httpd/ssl_error_log” 2021-10-19-3:48:1
“/var/log/asterisk/zulu_out.log” 2021-7-13-3:0:0
“/var/log/chrony/.log" 2021-6-10-20:0:0
“/var/log/wtmp” 2021-10-7-12:31:41
“/var/log/asterisk/oracle_connector.log” 2021-7-31-3:0:0
“/var/log/asterisk/event_log” 2021-6-10-20:0:0
“/var/log/spooler” 2021-10-19-3:48:1
“/var/log/btmp” 2021-10-7-12:31:41
"/var/log/asterisk/restapps_
.log” 2021-6-13-3:0:0
“/var/log/fail2ban.log” 2021-10-7-12:31:41
“/var/log/xferlog” 2021-6-10-20:0:0
“/var/log/asterisk/fail2ban” 2021-10-19-13:36:38
“/var/log/iscsiuio.log” 2021-6-10-20:0:0
“/var/log/asterisk/core-fastagi_out.log” 2021-10-7-12:31:41
“/var/log/asterisk/freepbx.log” 2021-10-17-3:50:1
“/var/log/maillog” 2021-10-19-3:48:1
“/var/log/httpd/ssl_request_log” 2021-10-8-3:22:1
“/var/log/asterisk/oracle_engine_out.log” 2021-7-31-3:0:0
“/var/log/radius/checkrad.log” 2021-6-10-20:0:0
“/var/log/wpa_supplicant.log” 2021-10-7-12:31:41
“/var/log/secure” 2021-10-19-3:48:1
“/var/log/asterisk/nativeapps.log” 2021-6-13-3:0:0
“/var/log/asterisk/freepbx_security.log” 2021-10-7-11:50:57
“/var/log/asterisk/core-fastagi_err.log” 2021-6-13-3:0:0
“/var/log/asterisk/freepbx_dbug” 2021-6-13-3:0:0
“/var/log/asterisk/restapps_out.log” 2021-10-7-12:31:41
“/var/log/radius/radius.log” 2021-6-10-20:0:0
“/var/log/asterisk/oracle_engine_err.log” 2021-7-31-3:0:0
“/var/log/asterisk/qcallback_*.log” 2021-7-31-3:0:0
“/var/log/messages” 2021-10-19-3:48:1
“/var/log/httpd/access_log” 2021-10-19-3:48:1
“/var/account/pacct” 2021-6-10-20:0:0
“/var/log/cron” 2021-10-19-3:48:1
“/var/log/vsftpd.log” 2021-10-19-3:48:1

Then if it doesn’t run tomorrow, I’m stumped :slight_smile:

My guess is that it could start working (as it’s done before), then all of a sudden stop.
Would it hurt if I just put the “logrotate -vf /etc/logrotate.d/asterisk” in the root crontab file to run at night? That way if the logrotate didn’t run correctly as it’s scheduled to, then it would run via my crontab?

Thanks so much!

Well you could but it would functionally duplicate the cron.daily job.

You could of you want edit the cron.daily job to

/usr/sbin/logrotate -vf /etc/logrotate.conf

which would achieve the same but add verbosity to the logrotate log

I’ll see if it fails again and if it does, I’ll add this line to the cron.daily to see if that will encourage the logrotate. I’ll post my results once I see what’s going on.
Thanks again!

Just to clarify, comment out the original version and add the replacement ‘just in case’

I can’t see why logrotate would need a specific ‘state-file’ , the replacement would use the default and

man logrotate 

would clarify for you why you might need one.

I’m a little out of my depth here, as all but one of my systems all use systemd and systemd ‘timers’ to manage log rotation.

Perhaps a knowledgeable “distro” user can clarify.