I tried twice to install freepbx 13 on debian jessie, after add some extensions, reload failed always.
after “fwconsole reload”
/root$ fwconsole reload
Reloading FreePBX
Error(s) have occured, the following is the retrieve_conf output:
exit: 1
Exception: Unable to connect to Asterisk Manager from /var/lib/asterisk/bin/retrieve_conf, aborting in file /var/lib/asterisk/bin/retrieve_conf on line 11
Stack trace:
Automatic Startup
Please note you need to set up FreePBX to start asterisk (and it's associated services) on bootup. You can view an example systemd startup script here.
Thanks Andrew, that’s a change since I last had to deal with anything there =) noted!
Seems like a quick look at retrieve_conf line 11 might tell us what the problem is…not able to get to a system right now though. I’m assuming you tried fwconsole chown?
I didn’t set database password as instruction, top lines of retrieve_conf as below:
#!/usr/bin/env php
<?php
// License for all code of this FreePBX module can be found in the license file inside the module directory
// Copyright 2013 Schmooze Com Inc.
//
//include bootstrapper
$bootstrap_settings[‘freepbx_auth’] = false;
include_once ‘/etc/freepbx.conf’;
if (!$bootstrap_settings[‘astman_connected’]) {
throw new \Exception(sprintf(_(“Unable to connect to Asterisk Manager from %s, aborting”),FILE));
}
$meminfo = getSystemMemInfo();
if(!empty($meminfo[‘MemTotal’])) {
$memt = preg_replace(“/\D/”,“”,$meminfo[‘MemTotal’]);
ini_set(‘memory_limit’,$memt.‘K’);
} else {
$memt = 0;
}
$nt = notifications::create($db);
$mems = isset($meminfo[‘SwapTotal’]) ? preg_replace(“/\D/”,“”,$meminfo[‘SwapTotal’]) : ‘’;
if(empty($mems)) {
$nt->add_warning(‘core’, ‘SWAP’, _(“No Swap”), _(“Your system has no swap space. This should be fixed as soon as possible. Once fixed issue a reload to remove this message”));
} else {
if($mems < 200000) {
$nt->add_warning(‘core’, ‘SWAP’, (“No Swap”), sprintf((“The swap space of your system is too low (%s KB). You should have at least %s KB of swap space. This should be fixed as soon as possible. Once fixed issue a reload to remove this message”),$mems,200000));
} else {
$nt->delete(‘core’, ‘SWAP’);
}
}
$freepbx_conf =& freepbx_conf::create();
$loc = fpbx_which(“asterisk”);
if(empty($loc)) {
throw new \Exception((“Unable to find the Asterisk binary”));
} else {
exec($loc . " -rx ‘core show version’",$out,$ret);
if($ret != 0) {
throw new \Exception((“Unable to connect to Asterisk through the CLI”));
}
}
// Load the BMO Object
$bmo = FreePBX::create();
//Load Asterisk Manager into Memory
$bmo->astman->useCaching = true;
$bmo->Performance->Start(“load_astdb”);
$bmo->astman->LoadAstDB();
$bmo->Performance->Stop(“load_astdb”);
// $bmo->Performance->On();
$bmo->Performance->Start(“trust_gpg”);
$bmo->GPG->trustFreePBX();
$bmo->Performance->Stop();