FreePBX says Asterisk not running, and Reload failed because retrieve_conf encountered an error

Hi All,

I have been meandering over this all day and have seen a couple other posts about this issue, none of which have helped me yet. Here is the quick summary:

FreePBX console is running, but it shows an error for Asterisk status saying

  • “Asterisk is not running” …

If I try to Apply Config Changes, then I get an error saying:

  • “Reload failed because retrieve_conf encountered an error: 126” - Permission Denied

Extensions is Greyed out on the menu.

I have tried all the suggestions from previous posts with no luck. I did have some common issues, but they have now been resolved after updating modules etc…

Thanks in advance.

Here is the rest of what I know:

FreePBX is currently on version 2.5.1.5 with all the modules installed and upgraded.

Going into the console I have the following details:

asterisk -rx “core show version”

Asterisk 1.4.26 built by root @ biz2.bizswitch.net on a i686 running Linux on 2009-07-23 08:13:19 UTC

ps aux | grep asterisk

asterisk 2490 0.3 1.0 36624 16780 ? S 16:15 0:14 /usr/sbin/httpd
asterisk 2491 0.5 1.2 39796 20048 ? S 16:15 0:22 /usr/sbin/httpd
asterisk 2492 0.3 1.0 36904 17052 ? S 16:15 0:13 /usr/sbin/httpd
asterisk 2493 0.3 1.0 36884 17036 ? S 16:15 0:14 /usr/sbin/httpd
asterisk 2494 0.3 1.0 36472 16608 ? S 16:15 0:12 /usr/sbin/httpd
asterisk 2495 0.3 1.1 37424 17580 ? S 16:15 0:13 /usr/sbin/httpd
asterisk 2496 0.3 1.1 37116 17268 ? S 16:15 0:13 /usr/sbin/httpd
asterisk 2497 0.3 1.0 36480 16632 ? S 16:15 0:13 /usr/sbin/httpd
asterisk 5066 0.0 0.5 23088 8564 pts/1 Sl 16:38 0:00 /usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c
asterisk 5135 0.0 0.0 4532 488 ? S 16:38 0:00 -bash -c cd /var/www/html/panel && /var/www/html/panel/safe_opserver &
asterisk 5136 0.0 0.0 4480 1060 ? S 16:38 0:00 sh /var/www/html/panel/safe_opserver
asterisk 5137 0.0 0.5 12116 8332 ? S 16:38 0:00 /usr/bin/perl /var/www/html/panel/op_server.pl

asterisk#>>/var/lib/asterisk/bin/retrieve_conf

Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf …OK
Bootstrapping /etc/amportal.conf …OK
Parsing /etc/amportal.conf …OK
Parsing /etc/asterisk/asterisk.conf …OK
Connecting to database…OK
Connecting to Asterisk manager interface…OK
Added to globals: ASTETCDIR = /etc/asterisk
Added to globals: ASTMODDIR = /usr/lib/asterisk/modules
Added to globals: ASTVARLIBDIR = /var/lib/asterisk
Added to globals: ASTAGIDIR = /var/lib/asterisk/agi-bin
Added to globals: ASTSPOOLDIR = /var/spool/asterisk
Added to globals: ASTRUNDIR = /var/run/asterisk
Added to globals: ASTLOGDIR = /var/log/asterisk
Added to globals: CWINUSEBUSY = true
Added to globals: AMPMGRUSER = admin
Added to globals: AMPMGRPASS = abc
Please update your modules and reload Asterisk by visiting http://192.168.1.100/admin

locate retrieve_conf
/usr/src/freepbx-2.5.0/amp_conf/bin/retrieve_conf
/var/lib/asterisk/bin/retrieve_conf
/var/www/html/admin/modules/framework/bin/retrieve_conf

ls -l /var/lib/asterisk/bin/retrieve_conf
-rwxrwxr-x 1 asterisk asterisk 27081 Jul 23 15:47 /var/lib/asterisk/bin/retrieve_conf

ls -l /var/www/html/admin/modules/framework/bin/retrieve_conf
-rwxrwxr-x 1 asterisk asterisk 27393 Mar 21 17:49 /var/www/html/admin/modules/framework/bin/retrieve_conf

All, just to let you know that the issue has been resolved.

I don’t have a zaptel device (since running to PBX through a different provider) and so the init scripts were failing. I followed the install scripts to the line and they included the zaptel drivers (and so i assumed some other functions may need the libraries etc…).

Summary: I disabled the zaptel startup script (/etc/init.d/zaptel) and removed the zaptel.ko module.

Hope this helps someone else…

I am not sure that is a good fix. You would at the very least need ztdummy for a timing source.

FreePBX console is running, but it shows an error for Asterisk status on the FreePBX System Status Page saying

  • “Asterisk is not running” …

I also have a warning that the SSH server is not running when it is and an intermittent error that says the Web server is not running when it is (sometimes it will go green - so that’s why I say intermittent)

I also get an error saying "“Reload failed because retrieve_conf encountered an error: 126”

and one other failure that is too long to print but looks like an SQL query that refers to custom extensions but is related to the retrieve_conf failure

Also extensions is Greyed out on the menu

All other functionality in the web pages is fine. So if tadpole’s fix is not correct then what is the correct fix???

I got the same issue and after spending a few hours I found it was caused by SELinux.

Edit /etc/selinux/config and set

SELINUX=disabled