Logrotate error


(Fbedia) #1

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.


(Lorne Gaetz) #2

What is the output of

cat /etc/logrotate.d/pms

(Fbedia) #3

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 ~]#

#4

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
}


(Lorne Gaetz) #5

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.


(Fbedia) #6

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

Thank you very much.


(Brian B) #7

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.


(Lorne Gaetz) #8

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.


#9

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


(system) closed #10

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