Cron sends mail with Error in PHP-ASManager.php on line 238

we got this at one of our systems every two minutes - any idea what i can do to solve this?

Exception: Asterisk is not connected in file /var/www/html/admin/libraries/php-asmanager.php on line 238
Stack trace:

  1. Exception->() /var/www/html/admin/libraries/php-asmanager.php:238
  2. AGI_AsteriskManager->send_request() /var/www/html/admin/modules/dashboard/classes/AsteriskInfo.class.php:27
  3. AsteriskInfo2->get_channel_totals() /var/www/html/admin/modules/dashboard/classes/SysInfo.class.php:94
  4. SysInfo->getAstInfo() /var/www/html/admin/modules/dashboard/classes/SysInfo.class.php:55
  5. SysInfo->getSysInfo() /var/www/html/admin/modules/dashboard/Dashboard.class.php:175
  6. Dashboard->genSysInfo() /var/www/html/admin/modules/dashboard/Dashboard.class.php:209
  7. Dashboard->getSysInfo() /var/www/html/admin/modules/dashboard/Dashboard.class.php:158
  8. Dashboard->runTrigger() /var/www/html/admin/modules/dashboard/scheduler.php:35

I’m gonna guess that Asterisk is not running, or the credentials/ACL for your user is not set correctly. Check /var/log/asterisk/full for more information on what is trying to access the server and which condition is causing the fault.

This can also happen in the firewall decides to blacklist your source address as well, so you might want to check that.

http://issues.freepbx.org/browse/FREEPBX-12233

Thanks for your fast reply, Dave.

Asterisk is running fine! Also i checked the full-log, there’s no entry that appears every two minutes!
i am sorry, i forgot to mention an important information, the causing script is:
Cron asterisk@asterisk [ -x /var/www/html/admin/modules/dashboard/scheduler.php ] && /var/www/html/admin/modules/dashboard/scheduler.php
…so localhost, no firewall involved.

what else to check?

is asterisk running as root

i am not sure which role safe_asterisk has here, but beside this, no:

[root@localhost ~]# ps aux | grep asterisk
asterisk 7260 0.0 1.5 706916 29200 ? Ssl Sep26 0:04 /usr/bin/node /var/www/html/admin/modules/ucpnode/node/node_modules/forever/bin/monitor index.js
asterisk 12846 0.0 1.4 463732 27032 ? S Oct05 0:00 /usr/sbin/httpd
asterisk 12892 0.0 0.0 108164 532 ? S Oct05 0:00 /bin/bash /var/www/html/admin/modules/xmpp/start-xmpp.sh
asterisk 12893 0.4 1.6 339232 30920 ? S Oct05 3:21 /usr/bin/php -q /var/www/html/admin/modules/xmpp/presence.php
asterisk 13251 0.0 0.4 351616 9336 ? S Oct05 0:00 /usr/sbin/httpd
root 42877 0.0 0.0 106060 760 ? S Sep30 0:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk -g
asterisk 42880 1.2 3.9 1580200 75260 ? Sl Sep30 101:49 /usr/sbin/asterisk -f -U asterisk -G asterisk -g -vvvg -c
asterisk 46851 0.0 1.1 458768 22364 ? S Oct02 0:01 /usr/sbin/httpd
asterisk 46852 0.0 3.5 512096 67028 ? S Oct02 0:01 /usr/sbin/httpd
asterisk 46853 0.0 1.5 475772 30120 ? S Oct02 0:00 /usr/sbin/httpd
asterisk 46854 0.0 3.2 506912 62132 ? S Oct02 0:01 /usr/sbin/httpd
asterisk 46855 0.0 1.4 463264 28296 ? S Oct02 0:00 /usr/sbin/httpd
asterisk 46856 0.0 0.9 454376 18972 ? S Oct02 0:00 /usr/sbin/httpd
asterisk 46857 0.0 1.1 457192 21516 ? S Oct02 0:00 /usr/sbin/httpd
asterisk 46858 0.0 1.6 477256 31708 ? S Oct02 0:00 /usr/sbin/httpd
root 59077 0.0 0.0 103248 884 pts/1 S+ 06:10 0:00 grep asterisk
[root@localhost ~]#

sorry al for taking your time! you are right, this happens, because asterisk is not running. the mails came from a completely different machine then i expected!

so, this is solved. thanks all for giving me the right hints!