FreePBX Cron Bug /var/lib/asterisk/bin/freepbx-cron-scheduler.php

The Deacon

Guru
Joined
Jan 29, 2008
Messages
296
Reaction score
14
From: Cron daemon ([email protected])
To: [email protected]
Subj: cron <root@pbx> /var/lib/asterisk/bin/freepbx-cron-scheduler.php

rm: missing operand
Try `rm --help' for more information.


Is it just me, or is anyone else seeing this?

Since I get my logs e-mailed to me, I'm seeing this every hour.
 

andygee

New Member
Joined
Oct 22, 2007
Messages
96
Reaction score
0
I had this as well this morning. Error in message is

PHP Notice: Undefined variable: conf in /var/www/html/admin/functions.inc.php on line 834

or at least for me.
 

shane

Member
Joined
Dec 19, 2008
Messages
77
Reaction score
1
I am getting the same error. Anyone have an idea on the cause?
 

andygee

New Member
Joined
Oct 22, 2007
Messages
96
Reaction score
0
I believe it has to do with FreePBX checking for updates. If you will do another module update and upgrade any that are out there I believe it will go away. At least it did for me.

Andy
 

shane

Member
Joined
Dec 19, 2008
Messages
77
Reaction score
1
I believe it has to do with FreePBX checking for updates. If you will do another module update and upgrade any that are out there I believe it will go away. At least it did for me.

Andy
Thanks for the recommendation. Unfortunately I already had all the updates :(
 

andygee

New Member
Joined
Oct 22, 2007
Messages
96
Reaction score
0
Yeah and unfortunately I spoke to soon. I've got it happening again on several systems that I take care of.
 

jweek

New Member
Joined
Jul 12, 2008
Messages
15
Reaction score
0
I've been seeing this error for a couple of weeks - has anyone found a fix?

thanks,

john
 

SteveM

New Member
Joined
Jun 16, 2008
Messages
16
Reaction score
1
I imagine a change will come out in the next batch of updates, but to get rid of the message, add the line 808 in /var/www/html/admin/functions.inc.php as indicated on this page:
freepbx.org/trac/changeset/7729
 

jweek

New Member
Joined
Jul 12, 2008
Messages
15
Reaction score
0
Steve -

I added the line as noted, but the error still occurs. :confused5:
 

SteveM

New Member
Joined
Jun 16, 2008
Messages
16
Reaction score
1
That's odd, I haven't seen the error since I added that line.
 

The Deacon

Guru
Joined
Jan 29, 2008
Messages
296
Reaction score
14
Add another one to the "it didn't fix it for me" list

I too have added that line and am seeing the same error...

Weird...
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Deacon- Could you paste the full text of the error message you are getting?
 

The Deacon

Guru
Joined
Jan 29, 2008
Messages
296
Reaction score
14
Hey Tony,

Here is the e-mail that I'm receiving from the box:

Code:
from[IMG]https://mail.google.com/a/highness.com/images/cleardot.gif[/IMG]: Cron Daemon <[email protected]>
to: [IMG]https://mail.google.com/a/highness.com/images/cleardot.gif[/IMG][email protected]
date[IMG]https://mail.google.com/a/highness.com/images/cleardot.gif[/IMG]: Fri, May 29, 2009 at 6:27 AM
subject:[IMG]https://mail.google.com/a/highness.com/images/cleardot.gif[/IMG]Cron <root@pbx> /var/lib/asterisk/bin/freepbx-cron-scheduler.php

[IMG]https://mail.google.com/a/highness.com/images/cleardot.gif[/IMG]
rm: missing operand
Try `rm --help' for more information.
Hopefully you can make some sense out of it...

-Rick
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Do you also get a message about this failure in the FreePBX notices section of the FreePBX status page? If so - It would be good to have the text of that.

Also - if you have time, could you please get one more bit of data? Using phpMyAdmin, review and capture the data in the field asterisk.cronmanager. There is usualy a single entry, but may be as many as three or more depending upon exactly what (3rd party modules) you have installed on your PBX.
-Tony
 

The Deacon

Guru
Joined
Jan 29, 2008
Messages
296
Reaction score
14
Hey Tony,

Here is what I see on the control panel screen:

Picture1.png


This is what I see in the asterisk.cronmanager table:

Code:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9053
Server version: 5.0.45-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> select * from asterisk.cronmanager;
+--------------+----------+------+------+------------+-------------------------------------------------------------------------------+
| module       | id       | time | freq | lasttime   | command                                                                       |
+--------------+----------+------+------+------------+-------------------------------------------------------------------------------+
| module_admin | UPDATES  | 20   |   24 | 1243549622 | /var/lib/asterisk/bin/module_admin listonline                                 | 
| weatherzip   | PURGETTS | 23   |   24 | 1241763661 | /usr/bin/find /var/lib/asterisk/sounds/tts -name "*.wav" -mtime +1 | xargs rm | 
+--------------+----------+------+------+------------+-------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql>
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Rick;
You are suffering from a non damaging bug in a previous version of Weather by ZIP. To fix it, uninstall the current version, and reinstall the most recent. If you already run the most recent, then a simple uninstall and reinstall will solve it.

This error looks and smells like the FreePBX error that is being discusses here, but its just a coincidence. The presence of an error in FreePBX whose symptoms are so similar to this one caused me to miss it in this thread for a time. Sorry to have been late to the party!
 

jweek

New Member
Joined
Jul 12, 2008
Messages
15
Reaction score
0
Tony -

your suggestion fixed my problem, thanks for all you do!!

John
 

dswartz

Guru
Joined
Feb 17, 2009
Messages
1,056
Reaction score
0
I am having a similar issue

I see periodic messages from cron like this:

/usr/bin/find: rm/var/lib/asterisk/sounds/tts/tts-fea09a5a07c73a9cd878a58661f7687e.wav: No such file or directory

the problem seems to be that there is no space between the 'rm' and the pathname. I found this thread talking about a similar issue. I uninstalled and re-installed the weather by zip module, but I see the same suspicious line in the cronmanager mysql table:

| weatherzip | every_day | 23 | 24 | 0 | /usr/bin/find /var/lib/asterisk/sounds/tts -name "*.wav" -mtime +1 -exec rm{} \; |

notice the lack of a space between the 'rm' and the '{}'?
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Im assuming you have the most recent version of the module -

I would like to inspect some of our systems that run the module and see if I have the same errors. It's always possible I managed to miss them.

Where do they show up?
 

dswartz

Guru
Joined
Feb 17, 2009
Messages
1,056
Reaction score
0
in the periodic cron job.

looking at the sql statement, i don't see how it can NOT get the error.
 

Members online

Forum statistics

Threads
25,838
Messages
167,925
Members
19,260
Latest member
lucky
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top