Error during overnight Log Rotation on PBXact

The following email notification gets generated from one of my PBXact deployments @ 04:02 every night (since 25-Jul);

Cron [email protected] [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.daily
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 ?

Distro version: 12.7.8-2203-2.sng7
PBXact version:
Asterisk version: 16.28.0

Your PBXact POMPS includes support for bugs. I suggest you follow up with a support ticket.

Yes & I will raise one if I can’t work it out for myself with/without any assistance in this forum.

Are you saying you think this is a bug ?

I am also getting this error, every night at 4am.

Subject: Cron [email protected] [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.daily

error: sangomaconnect:78 duplicate log entry for /var/log/asterisk/connect-proxy.log
error: found error in file sangomaconnect, skipping

can anyone point me in the direction of fixing it?

I am getting this same error via email every morning, as well, on my FreePBX. Any news on what might be causing this or if there is a fix?

I’ve submitted a Sangoma Support Ticket for this - I’ll update this thread if/when I get a resolution.

I had the same error. Traced the logrotate command and found the duplicate code referenced in the error.

You can login via SSH and run the command

# /usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf

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:

# /usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf

Maybe someone can chime in and confirm if this is the best solution, but it did correct the error.

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;

  1. These duplicated entries differ slightly, what is the ‘official’ solution/which should be removed ?
  2. 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) ?
  3. 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).