New installation reload failed still

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:

  1. Exception->() /var/lib/asterisk/bin/retrieve_conf:11

Another issue: PJSIP extensions disappeared from extension menu. I am sure I installed PJSIP and it disappeared after reboot today.

Are both Asterisk and Apache2 running as the asterisk user?

ps aux|grep asterisk

1 Like

Sorry I don’t know, just follow the instruction: Sangoma Documentation

/root$ ps aux|grep asterisk
asterisk 1029 0.0 2.4 115044 12516 ? S 00:31 0:01 /usr/sbin/apache2 -k start
asterisk 1030 0.0 2.7 114408 14096 ? S 00:31 0:01 /usr/sbin/apache2 -k start
asterisk 1031 0.0 2.0 113740 10464 ? S 00:31 0:00 /usr/sbin/apache2 -k start
root 1536 0.0 0.0 1432 296 ? S 00:32 0:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
asterisk 2405 0.1 3.2 115752 16384 ? S 00:36 0:02 /usr/sbin/apache2 -k start
asterisk 2416 0.0 3.3 116996 16780 ? S 00:36 0:01 /usr/sbin/apache2 -k start
asterisk 2419 0.3 4.1 115304 21152 ? S 00:36 0:06 /usr/sbin/apache2 -k start
asterisk 2421 0.0 2.2 114068 11568 ? S 00:36 0:01 /usr/sbin/apache2 -k start
asterisk 2422 0.1 3.3 113948 17128 ? S 00:36 0:02 /usr/sbin/apache2 -k start
asterisk 3137 0.8 4.1 117944 21204 ? S 00:39 0:12 /usr/sbin/apache2 -k start
asterisk 3392 0.0 2.2 115340 11568 ? S 00:40 0:00 /usr/sbin/apache2 -k start
asterisk 7859 98.8 3.8 56100 19532 ? Rl 01:03 0:16 /usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c
asterisk 7895 0.0 0.0 1432 244 ? Ss 01:04 0:00 /bin/sh -c [ -x /var/www/html/admin/modules/dashboard/scheduler.php ] && /var/www/html/admin/modules/dashboard/scheduler.php
asterisk 7896 63.0 2.6 48028 13652 ? S 01:04 0:00 php /var/www/html/admin/modules/dashboard/scheduler.php
root 7902 0.0 0.1 3672 756 ? S 01:04 0:00 grep asterisk

From your "instruction " did you do the

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.

?

I already did as Sangoma Documentation

Sorry, IWFM, please wait for someone above my paygrade :slight_smile:

I don’t think this is it, but can you verify that the user/secret in /etc/asterisk/manager.conf matches the file /etc/amportal.conf?

17 posts were split to a new topic: PJSIP is very buggy

We ignore that file.

Right or wrong this isn’t the thread…

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?

So back to the OP’s issue, sounds like he needs to do something like:
grep -o “secret=(.*)$” /etc/asterisk/manager.conf

then update the manager password from the GUI or something like that…

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();

$bmo->Performance->Start(“check_html5”);
$bmo->Media->getSupportedHTML5Formats();
$bmo->Performance->Stop();

$bmo->Performance->Start(“retrieve_conf”);
$bmo->Hooks->updateBMOHooks();