HELP PBX not working fwconsole and amportal commands do not work

I was updating a module and it seemed frozen so I did a hard restart of the server and now nothing works.

I get a string of errors like:

PHP Fatal error: Uncaught exception ‘Whoops\Exception\ErrorException’ with message ‘file(/etc/asterisk/asterisk.conf): failed to open stream: No such file or directory’ in /var/www/html/admin/libraries/BMO/Freepbx_conf.class.php:418

Show us the content of:

 /etc/asterisk/asterisk.conf

ok standby
and thanks in advance

While i was waiting i decided to update asterisk to 10.13.66-1
because i had updated to 13 via the web gui a month ago for the firewall but when i checked cat /etc/schmooze/pbx-version it returned: 6.12.65-32

Its towards the end of clean up.

Hope I didn’t just make things worse

So the upgrade completed but is saying:

Sat Mar 4 11:26:05 EST 2017 UPGRADE 100% COMPLETED
Unlocked.
REBOOT YOUR BOX NOW
If you would like to change your Asterisk release version from
1.8, 10, 11 or 12 you can do so by typing asterisk-version-switch
from the linux CLI at anytime

I am waiting to do that if that will interfere with your diagnosis – right now I am in the upgrade directory i created and when I type /etc/asterisk/asterisk.conf
i get
bash: /etc/asterisk/asterisk.conf: No such file or directory

cat /etc/asterisk/asterisk.conf

[[email protected] ~]# cat /etc/asterisk/asterisk.conf
cat: /etc/asterisk/asterisk.conf: No such file or directory

Also if this helps diagnose - when i log in i get the following error messages

PHP Warning: include_once(/etc/freepbx.conf): failed to open stream: Permission denied in /var/lib/asterisk/bin/fwconsole on line 12
PHP Warning: include_once(): Failed opening ‘/etc/freepbx.conf’ for inclusion (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/lib/asterisk/bin/fwconsole on line 12
PHP Fatal error: Class ‘Symfony\Component\Console\Application’ not found in /var/www/html/admin/libraries/FWApplication.class.php on line 11

Will any more help be coming today? I’m really stuck.

Looks like at least two critical files are missing, which might indicate drive failure or file system corruption (wild guess). You can pull those files from a working system or a backup, but I suspect you will discover more issues as you continue. If you are storing backups locally in the same system, make sure to copy them off system asap.

How can I see if I have the files backed up? I never got a complete back up ever because I didn’t realize that the hard drive was full. Now I added gigs to my virtual server. Or where could I get a copy of those files.

It crashed while checking for dat field to remove during installation of CEL.

Looks like I have a backup from May - how do I restore via SSH? And is there an issue that I upgraded system to 13 meanwhile?

May 1, 2016, 12:01 am - Backup Lock acquired!
May 1, 2016, 12:01 am - Running pre-backup hooks…
May 1, 2016, 12:01 am - Adding items…
May 1, 2016, 12:01 am - Backup Lock acquired!
May 1, 2016, 12:01 am - Running pre-backup hooks…
May 1, 2016, 12:01 am - Adding items…
May 1, 2016, 1:09 am - Bulding manifest…
May 1, 2016, 1:09 am - Creating backup…
May 1, 2016, 1:10 am - Storing backup…
May 1, 2016, 1:10 am - Bulding manifest…
May 1, 2016, 1:10 am - Running post-backup hooks…
May 1, 2016, 1:10 am - Backup successfully completed!

The last back up was more recent after i upgraded to 13 but was completed with errors probably because hd was full

February 26, 2017, 12:00 am - Backup Lock acquired!
February 26, 2017, 12:00 am - Running pre-backup hooks…
February 26, 2017, 12:00 am - Adding items…
February 26, 2017, 12:08 am - Backup failed dumping SQL database [asteriskcdrdb] to file [/var/spool/asterisk/tmp/backup-4/mysql-4.sql], you have a corrupted backup from server [localhost].
February 26, 2017, 12:17 am - Building manifest…
February 26, 2017, 12:17 am - Creating backup…
February 26, 2017, 12:17 am - Storing backup…
February 26, 2017, 12:17 am - Error copying /var/spool/asterisk/tmp/20170226-000016-1488085216-13.0.190.12-151571410.tgz to /var/spool/asterisk/backup/Feb_2016/20170226-000016-1488085216-13.0.190.12-151571410.tgz:
February 26, 2017, 12:17 am - Running post-backup hooks…
February 26, 2017, 12:17 am - Backup completed with errors!

If you have an intact 12 backup, you need to restore it on a working 12 system. Do not restore a 12 backup on a 13 system.

This is what appears to be in the directory

[[email protected] backup]$ ls -lh
total 16K
drwxrwxr-x 2 asterisk asterisk 4.0K Mar 1 00:34 Default_backup
drwxrwxr-x 2 asterisk asterisk 4.0K Feb 26 00:17 Feb_2016
drwxrwxr-x 2 asterisk asterisk 4.0K Mar 12 2015 March_12_2015
drwxrwxr-x 2 asterisk asterisk 4.0K Oct 28 2014 OCT_28_2014