Logrotate error

Hello! Every time FreePBX is restarted the following error message appears:

/etc/cron.daily/logrotate:
error: pms:2 unexpected log filename
error: found error in /var/log/asterisk/pms.log , skipping
error: pms:18 unexpected }
error: found error in file pms, skipping

How can i fix this?

Thanks.

What is the output of

cat /etc/logrotate.d/pms

Hello Igaetz, sorry for the delay.

This is the output:

[root@localhost ~]# cat /etc/logrotate.d/pms
/var/log/asterisk/pms.log {
/var/log/asterisk/pms.log {
       daily
       daily
       missingok
       missingok
       rotate 15
       notifempty
       rotate 15
       sharedscripts
       notifempty
       create 0640 asterisk asterisk
       sharedscripts
       su asterisk asterisk
}
       create 0640 asterisk asterisk
       su asterisk asterisk
}
[root@localhost ~]#

Over enthusistic copy/pasteing ?

/var/log/asterisk/pms.log {
/var/log/asterisk/pms.log {

remove one of those lines

at the bottom remove

create 0640 asterisk asterisk
su asterisk asterisk
}

1 Like

Here is what the file should look like:

/var/log/asterisk/pms.log {
       daily
       missingok
       rotate 15
       notifempty
       sharedscripts
       create 0640 asterisk asterisk
       su asterisk asterisk
}

For some reason all your lines are duplicated. Can’t say I’ve seen that reported before.

1 Like

Just that!
I have edited the file as they say.

Thank you very much.

1 Like

For what it is worth, mine looked exactly the same. I certainly didn’t edit it to look that way. At least it was easy to find this topic and fixing the file manually was easy to do. Some automation that creates this file or edits it during an update corrupted it.

Cause of issue identified and fix published for Hospitality Management module versions 13.0.2.62, 14.0.2.68 and 15.0.2.52.

Besides that error in logrotate, one other thing, if PMS is removed/uninstalled, that logrotate entry is still left behind - seems like an error in the cleanup or uninstallation script

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.