FreePBX 17 install issues 2

This continues my foray into F17. I have started a new thread for clarity.

Remaining from my first thread: When starting up the VM, I had got

Failed to start sangoma-pnpd.service

I’ve now done a module update and a handfult updates came up. I then re-started the VM.

The service was not shown on the console as failed but systemctl status sangoma-pnpd.service still shows it as Failed to start.

The console now shows a new issue straight after starting:

Exception: SQLSTATE[HY000] [2002] No such file or directory::SQLSTATE[HY000] [2002] No such file or directory in file /var/www/html/admin/libraries/utility.functions.php on line 120

Caused by
PDOException: SQLSTATE[HY000] [2002] No such file or directory in file /var/www/html/admin/libraries/BMO/Database.class.php on line 141
Stack trace:
  1. Exception->() /var/www/html/admin/libraries/utility.functions.php:120
  2. die_freepbx() /var/www/html/admin/libraries/BMO/Database.class.php:147
  3. PDOException->() /var/www/html/admin/libraries/BMO/Database.class.php:141
  4. PDO->__construct() /var/www/html/admin/libraries/BMO/Database.class.php:141
  5. FreePBX\Database->__construct() /var/www/html/admin/libraries/BMO/FreePBX.class.php:83
  6. FreePBX->__construct() /var/www/html/admin/bootstrap.php:144
  7. require_once() /etc/freepbx.conf:12
  8. include_once() /var/lib/asterisk/bin/fwconsole:12

Two new issues found:

  1. Asterisk Info page shows: The Asterisk REST Interface is Currently Disabled. I can’t see how to enable it. Googling does not help.

  2. Asterisk Logfiles under reports seems to have gone AWOL.

I have installed the new VM at our remote site and connected it with a trunk to my existing system and can call the remote extension - so basic functionality seems OK.

Looks like MySQL is not running make sure it isn’t crashed. Also double check your disk space

I created an extension and its listed which I think implies that database access is working.

mariadb is running. Here is a list of running services:

root@F-PBX-DL2:/# systemctl list-units --type=service --state=running
  UNIT                     LOAD   ACTIVE SUB     DESCRIPTION
  apache2.service          loaded active running The Apache HTTP Server
  chrony.service           loaded active running chrony, an NTP client/server
  cron.service             loaded active running Regular background program processing daemon
  dbus.service             loaded active running D-Bus System Message Bus
  fail2ban.service         loaded active running Fail2Ban Service
  [email protected]       loaded active running Getty on tty1
  haproxy.service          loaded active running HAProxy Load Balancer
  incron.service           loaded active running file system events scheduler
  mariadb.service          loaded active running MariaDB 10.11.6 database server
  mongod.service           loaded active running MongoDB Database Server
  [email protected]        loaded active running Postfix Mail Transport Agent (instance -)
  redis-server.service     loaded active running Advanced key-value store
  rsyslog.service          loaded active running System Logging Service
  ssh.service              loaded active running OpenBSD Secure Shell server
  systemd-journald.service loaded active running Journal Service
  systemd-logind.service   loaded active running User Login Management
  systemd-udevd.service    loaded active running Rule-based Manager for Device Events and Files
  tftpd-hpa.service        loaded active running LSB: HPA's tftp server
  [email protected]           loaded active running User Manager for UID 0
  xinetd.service           loaded active running LSB: Starts or stops the xinetd daemon.

Its a new install in a new 52G VM

root@F-PBX-DL2:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            912M     0  912M   0% /dev
tmpfs           187M  604K  187M   1% /run
/dev/sda1        50G  8.9G   39G  19% /
tmpfs           934M  172K  934M   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           187M     0  187M   0% /run/user/0

I have raised these issues as bugs #128, #132. #134.

I did eventually find where to enable ARI but that just caused the message to change to The Asterisk REST Interface is not able to connect please check configuration in advanced settings.

After some more reading and guessing I solved this - see bug #132. I copy the relevant notes below:

  1. In Advanced settings: Set Display Readonly Settings to Yes and also set Override Readonly Settings to Yes
  2. Look in settings ARI Username and ARI Password for any non-alphanumeric characters and REMOVE. I found /+ as part of the name.
  3. Submit and Apply Config.
  4. Remember to turn off the settings made in step 1.

Problem solved.

So this is really an old bug - the system is still automatically generating random user/password values which are invalid.

Also, if it is important that by default ARI should be turned off, then wherever this results in a failure (like in Asterisk info which I would think is a core option) then clear instructions on how to turn it on should be included.)

PS: The Asterisk logfile is now called System logfile - an odd name change.