Mult emals - Cron <asterisk@24408486> [ -e /usr/sbin/fwconsole ] && sleep $((RANDOM

FYI, The history was literally me arguing with @dicko and someone else (who also ran cloud instances of FreePBX) in a thread here on community for a couple of days until I actually did the thing they/he was proposing

Additionally in FreePBX 2.5 or so there was also a cron manager of sorts. Which was abandoned at some point which is why the crontab looked horrendous after a couple of years. The Jobs class was there to solve that issue.

This is all too familiar with the recent sks gpg key servers issue as well. FYI if you didn’t know Jason Parker was the last one working on GPG issues (Publically) in FreePBX for Sangoma and he was “terminated” from Sangoma in October 2021 (see: Jason Parker - Jeltz | LinkedIn). Mergers and Acquisitions can be a b*tch.

1 Like

It is 2021, systemd ‘timers’ would likely better supervise maintenance tasks in an orderly fashion.

over to you @kgupta :wink:

4 Likes

I think we have agreed on this a few times for a few things already…

Changing $((RANDOM%30)) to $((RANDOM %30)) dependently fixed my issue.

\# sh -c "echo $((RANDOM %30))"
27
\# sh -c "echo $((RANDOM\%30))"
-bash: RANDOM\%30: syntax error: invalid arithmetic operator (error token is "\%30")

But some process keep rewriting /var/spool/cron/asterisk. Does any one know which process?

Checking my emails now I see this message started appearing for me today straight after the 06:35 UT automatic module Update email. It appears every 15 minutes.

So whatever is causing this came via the update. I just did a manual module update but there is no change.

I have not read through this long thread - is there a fix for this?

I have the same issue from this morning.

Same issue here.

Current PBX Version:
15.0.17.64
Current System Version:
12.7.8-2107-3.sng7

Same problem as documented in this thread. Basically FreePBX pushed an untested and broken module to your PBX. You will need to either wait for a fix, presumably next Friday, or manually revert the module. It is not a real killer but an incredibly incompetent release

Same here

FreePBX 15.0.17.64

Started after this mornings automated module updates, now recieving an email every 15 minutes from our FreePBX server.

Please advise.

Did you read this thread ?

Could someone please advise how to go back to the previous version.

1 Like

It might be a little more complicated than that, because the previous module didn’t inject a crontab and the broken one might not remove it on being ‘replaced’.

Any takers here?

1 Like

Using WinSCP I can see the relevant entry (the last line) in file /var/spool/cron/asterisk so I can delete it.

Would not then a rollback be adequate?

That would take some regression testing, ask FreePBX but they are currently not exactly A+ on that right now. Why not suck it and see. let us know how it worked out.

I’m happy to try but don’t know how to roll it back.

Since it seems the entire Sangoma team doesn’t care about anything outside of M-F 8-5…

I upgraded one of my PBX systems last night. I was not having any issues prior to the upgrade.

'userman' from 16.0.25.18 to 16.0.25.28

Now I have the 15 minute cron error.

[jbusch@pbx ~]$ sudo -u asterisk crontab -l
[sudo] password for jbusch: 

*/15 * * * * [ -e /etc/asterisk/firewall.enabled ] && touch /var/spool/asterisk/incron/firewall.firewall
*/15 * * * * [ -e /usr/sbin/fwconsole ] && sleep $((RANDOM\%30)) && /usr/sbin/fwconsole userman --syncall -q
* 3 * * * /usr/sbin/fwconsole util cleanplaybackcache -q
9 19 * * * [ -e /usr/sbin/fwconsole ] && /usr/sbin/fwconsole ma listonline --sendemail -q > /dev/null 2>&1
9 20 * * * [ -e /usr/sbin/fwconsole ] && /usr/sbin/fwconsole sys listonline --sendemail -q > /dev/null 2>&1
* * * * * [ -e /usr/sbin/fwconsole ] && sleep $((RANDOM\%30)) && /usr/sbin/fwconsole job --run --quiet 2>&1 > /dev/null

I checked edge, and there was an update to .29

| userman             | 16.0.25.28 | Online upgrade available (16.0.25.29)     | AGPLv3+     |
sudo fwconsole ma upgrade userman --edge
sudo fwconsole reload

And still a screwed up crontab.

*/15 * * * * [ -e /etc/asterisk/firewall.enabled ] && touch /var/spool/asterisk/incron/firewall.firewall
*/15 * * * * [ -e /usr/sbin/fwconsole ] && sleep $((RANDOM\%30)) && /usr/sbin/fwconsole userman --syncall -q
* 4 * * * /usr/sbin/fwconsole util cleanplaybackcache -q
47 17 * * * [ -e /usr/sbin/fwconsole ] && /usr/sbin/fwconsole ma listonline --sendemail -q > /dev/null 2>&1
47 18 * * * [ -e /usr/sbin/fwconsole ] && /usr/sbin/fwconsole sys listonline --sendemail -q > /dev/null 2>&1
* * * * * [ -e /usr/sbin/fwconsole ] && sleep $((RANDOM\%30)) && /usr/sbin/fwconsole job --run --quiet 2>&1 > /dev/null

Here are the known rollback options for FreePBX 16. I’ll start with .18 as that is where I came from.
image

sudo fwconsole ma downloadinstall userman --tag=16.0.25.18
sudo fwconsole reload

It removed the userman cron line.

[jbusch@pbx ~]$ sudo -u asterisk crontab -l

*/15 * * * * [ -e /etc/asterisk/firewall.enabled ] && touch /var/spool/asterisk/incron/firewall.firewall
* * * * * [ -e /usr/sbin/fwconsole ] && sleep $((RANDOM\%30)) && /usr/sbin/fwconsole job --run --quiet 2>&1 > /dev/null
* 2 * * * /usr/sbin/fwconsole util cleanplaybackcache -q
36 19 * * * [ -e /usr/sbin/fwconsole ] && /usr/sbin/fwconsole ma listonline --sendemail -q > /dev/null 2>&1
36 20 * * * [ -e /usr/sbin/fwconsole ] && /usr/sbin/fwconsole sys listonline --sendemail -q > /dev/null 2>&1

My last failure was at 6:15PM. It is now 6:24PM. I’ll know in a few minutes.
image

I am on 15: Upgrading module ‘userman’ from 15.0.63 to 15.0.65

The FreePBX docs say ‘Starting in version 12 you can downgrade module versions from Modue Admin.’ but my V15 Module Admin does not show a ‘Previous’ option.

You have to click check online before that becomes visible.

Not really surprised, it still comes in.
image