S500 will not connect with pnp .....Stopped Sangoma PnP Service.... KeyError: 'AMPDBHOST'

I am following the steps for first time setup of freepbx after loading freepbx stable distro and applying all module updates, when attempting the system updates it failed and it was suggested to do yum update which worked to apply all the updates and the system update system now works properly without error.

I setup an extension and used extension mapping to assign cfg to an s500 phone. I have 2 other setups that this is not an issue on, the PNP-#### shows up quickly. Not with this one. I wentto look at /var/log/messages and this is repeating and I think this is the issue but not sure how to fix it. I’ve seen a few other posts similar but no real answer.

PBX Version: 14.0.13.40
PBX Distro: 12.7.8-2008-1.sng7
Asterisk Version: 13.36.0

Sep 17 10:09:30 freepbx systemd: Stopped Sangoma PnP Service.
Sep 17 10:09:30 freepbx systemd: Started Sangoma PnP Service.
Sep 17 10:13:47 freepbx pnp_server: Starting Sangoma pnp_server
Sep 17 10:13:47 freepbx pnp_server: Traceback (most recent call last):
Sep 17 10:13:47 freepbx pnp_server: File “/usr/local/bin/pnp_server”, line 242, in
Sep 17 10:13:47 freepbx pnp_server: sysadmin = get_sysadmin_settings()
Sep 17 10:13:47 freepbx pnp_server: File “/usr/local/bin/pnp_server”, line 98, i n get_sysadmin_settings
Sep 17 10:13:47 freepbx pnp_server: dbh = get_db_handle()
Sep 17 10:13:47 freepbx pnp_server: File “/usr/local/bin/pnp_server”, line 57, i n get_db_handle
Sep 17 10:13:47 freepbx pnp_server: db = MySQLdb.connect(host=fpbx[‘AMPDBHOST’], user=fpbx[‘AMPDBUSER’], passwd=fpbx[‘AMPDBPASS’], db=fpbx[‘AMPDBNAME’])
Sep 17 10:13:47 freepbx pnp_server: KeyError: ‘AMPDBHOST’
Sep 17 10:13:47 freepbx systemd: sangoma-pnpd.service: main process exited, code =exited, status=1/FAILURE
Sep 17 10:13:47 freepbx systemd: Unit sangoma-pnpd.service entered failed state.
Sep 17 10:13:47 freepbx systemd: sangoma-pnpd.service failed.
Sep 17 10:13:47 freepbx systemd: sangoma-pnpd.service holdoff time over, schedul ing restart.
Sep 17 10:13:47 freepbx systemd: Stopped Sangoma PnP Service.
Sep 17 10:13:47 freepbx systemd: Started Sangoma PnP Service.
Sep 17 10:14:59 freepbx systemd-logind: New session 107 of user root.
Sep 17 10:14:59 freepbx su: (to asterisk) root on pts/0
[root@freepbx ~]# grep AMPDB /etc/asterisk/*
grep: /etc/asterisk/backup: Is a directory
/etc/asterisk/extensions_additional.conf:AMPDBENGINE = mysql
/etc/asterisk/extensions_additional.conf:AMPDBHOST = localhost
/etc/asterisk/extensions_additional.conf:AMPDBNAME = asterisk
/etc/asterisk/extensions_additional.conf:AMPDBUSER = freepbxuser
/etc/asterisk/extensions_additional.conf:AMPDBPASS = password removed for security

Thanks for any insight … disabling and re-enabling pnp did not help

get the same string above on a brand new clean install of Freepbx 15 without doing ANY updates … so what is going here? what am I missing? PLEASE

Just come across this same problem on a fresh install.

I’ve fixed it by editing /etc/freepbx.conf;

Replace the double quotes around the values with single quotes;

$amp_conf[‘AMPDBUSER’] = ‘freepbxuser’;
$amp_conf[‘AMPDBPASS’] = ‘xxxxxxxxxxxx’;
$amp_conf[‘AMPDBHOST’] = ‘localhost’;
$amp_conf[‘AMPDBNAME’] = ‘asterisk’;
$amp_conf[‘AMPDBENGINE’] = ‘mysql’;
$amp_conf[‘datasource’] = ‘’;

and add the missing ?> at the end of the file;

require_once “/var/www/html/admin/bootstrap.php”;
?>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.