The following email notification gets generated from one of my PBXact deployments @ 04:02 every night (since 25-Jul);
Cron root@hostname [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.daily
/etc/cron.daily/logrotate:
error: sangomaconnect:78 duplicate log entry for /var/log/asterisk/connect-proxy.log
error: found error in file sangomaconnect, skipping
The error seems to relate to line 78 in the file ‘/etc/logrotate.d/sangomaconnect’
RPM packages drop log rotation information into directory ‘/etc/logrotate.d’
The file ‘sangomaconnect’ appears to define the log rotation rules for the sangomaconnect module. Line 78 appears to relate to the rotation of log file ‘/var/log/asterisk/connect-proxy.log’
There is also a file called ‘connect-proxy’ that also appears to relate to the rotation of the same log file ‘/var/log/asterisk/connect-proxy.log’, however, both these entries exist on another PBXact deployment but do not trigger the same duplication email.
Can anyone point me to what might be causing this issue & where/how to resolve it ?
You should get the same error that you are seeing in your email.
error: sangomaconnect:78 duplicate log entry for /var/log/asterisk/connect-proxy.log
error: found error in file sangomaconnect, skipping
Then go to your logrotate directory and list the files:
# cd /etc/logrotate.d
# ls -la
You will find the following files, which contain an overlap, both calling to rotate the log for connect-proxy.log:
-rw------- 1 root root 230 Aug 31 09:28 connect-proxy
-rw-r--r-- 1 root root 1313 Aug 8 05:52 sangomaconnect
You need to either delete the file connect-proxy, or edit the file sangomaconnect and remove the last section at the bottom (line 78 and beyond) for connect-proxy.log
I am not sure which of the above options is preferred, but I took a guess and deleted entire file connect-proxy.log
# rm connect-proxy
Now run the logrotate script again and you will see the error is gone:
Thank you for sharing your own research & solution for this issue.
I can see that the command-line you’ve given is taken from the ‘/etc/cron.daily/logrotate’ script & sure enough, it triggers the same error on BOTH the PBXact installations I’m comparing.
I also concur (as per my original post) that the issue is likely caused by the connect-proxy.log rotation details being defined at BOTH line 1 of ‘/etc/logrotate.d/connect-proxy’ script AND line 78 of ‘/etc/logrotate.d/sangomaconnect’ script.
I guess my questions now become;
These duplicated entries differ slightly, what is the ‘official’ solution/which should be removed ?
Why do I get an email notification for this on one PBXact system but not the other (even though BOTH are configured for Email relaying) ?
If it weren’t for the email notification on ONE of these systems, I wouldn’t know about this issue - Do these errors get written to a log file ? - If so which ?
Coincidentally, I’ve literally just received an email from Sangoma regarding the Ticket I raised for this issue. They made the following statement in this email;
This is a known issue. Engineering have fixed this and a new version of the Sangoma Connect module that contains the fix will be released soon (hopefully by the end of this week).
I guess I’ll wait for the update & see if/how the issue is resolved.
The following module updates became available to my PBXact v15 systems today;
These appear to contain the fix that was advised by Sangoma support (which I mentioned in my previous post). I have installed these updates & run the log rotation command & my system NO LONGER shows ‘error: sangomaconnect:78 duplicate log entry for /var/log/asterisk/connect-proxy.log’.
I can also see that the update appears to have resolved this issue by removing the duplicate entry from ‘/etc/logrotate.d/sangomaconnect’ - The rotation info for ‘connect-proxy.log’ now only exists within ‘/etc/logrotate.d/connect-proxy’.
@3gt - Just a heads-up to you as you said you’d resolved this on your system by removing the ‘/etc/logrotate.d/connect-proxy’ file, if that’s the case, this update might leave you without any rotation for ‘connect-proxy.log’ (as it removes the rotation info you were using in the ‘/etc/logrotate.d/sangomaconnect’ file). Consequently, you might want to put back the file you deleted (assuming its not been re-created for you by the system/update).