Asterisk won't start after upgrade to 13

On the command line:

[root@confbridge01 bin]# fwconsole ma upgradeall
No repos specified, using: [extended,standard] from last GUI settings

Up to date.
Updating Hooks…Done
[root@confbridge01 bin]#

Then trying to apply the config on the web interface

Error!Close
Reload failed because retrieve_conf encountered an error: 1

click here for more info
1 error(s) occurred, you should view the notification log on the dashboard or main screen to check for more details.

Your system is somehow reporting that it is version 2.11 when you upgraded to 13. You have massive problems with this install. Do you want to keep using it?

Thank you for your help. Looks like it makes more sense to start over. Do you have any suggestions on removing what’s installed before I try to install afresh w/ 13?

Well I mean if you want to continue with this install and are OK with it I can walk you through a few steps that will recover it but I dont know what else will be wrong? I guess I’m asking if thats something you want to try?

Let me know the next steps and we can see if it makes sense to keep going. How about that? (Thanks for your help.)

Run these commands

mysql
use asterisk;
select * from admin where variable = 'version';

Paste the response here. Example:

mysql> select * from admin where variable = 'version';
+----------+---------+
| variable | value   |
+----------+---------+
| version  | 13.0.60 |
+----------+---------+
1 row in set (0.00 sec)

mysql> select * from admin where variable = ‘version’;
±---------±-------+
| variable | value |
±---------±-------+
| version | 2.11.0 |
±---------±-------+
1 row in set (0.00 sec)

Next command:

fwconsole ma list | grep framework

[root@confbridge01 rc.d]# fwconsole ma list | grep framework
| framework | 13.0.54 | Enabled |

fwconsole ma download http://mirror.freepbx.org/modules/packages/framework/framework-13.0.60.tgz
fwconsole ma install framework

Then

mysql
use asterisk;
select * from admin where variable = 'version';

[root@confbridge01 rc.d]# fwconsole ma download http://mirror.freepbx.org/modules/packages/framework/framework-13.0.60.tgz
No repos specified, using: [standard] from last GUI settings

Starting framework-13.0.60.tgz download…
Processing
Downloading…
8162259/8162259 [============================] 100%
Finished downloading
Extracting…Done
Module http://mirror.freepbx.org/modules/packages/framework/framework-13.0.60.tgz successfully downloaded

[root@confbridge01 rc.d]# fwconsole ma install framework
Unable to install module framework:

  • FreePBX version 13.0 or higher is required, you have 2.11.0
    Updating Hooks…Done

[root@confbridge01 rc.d]# mysql -p
Enter password:
mysql> use asterisk;

Database changed
mysql> select * from admin where variable = ‘version’;
±---------±-------+
| variable | value |
±---------±-------+
| version | 2.11.0 |
±---------±-------+
1 row in set (0.00 sec)

Let’s try this again

fwconsole ma download http://mirror.freepbx.org/modules/packages/framework/framework-13.0.61.3.tgz
fwconsole ma install framework

Then

mysql
use asterisk;
select * from admin where variable = 'version';

Not sure if it made a difference since I did it as root both times, but I changed out of one of the /etc directories I was working in to /root.

mysql> select * from admin where variable = ‘version’;
±---------±----------+
| variable | value |
±---------±----------+
| version | 13.0.61.3 |
±---------±----------+

Checking for updates on the module admin shows what is to be expected and “Apply Config” works! Is there anything else I need to do/check?

No I actually had to fix the framework package to allow you to continue

You should be good to go

1 Like

I restored a backup from another server (which I’d done manually before) and now I’m getting the retrieve_conf error again.

exit: 1
Whoops\Exception\ErrorException: mkdir(): No such file or directory in file /var/www/html/admin/libraries/BMO/Media.class.php on line 34
Stack trace:

  1. Whoops\Exception\ErrorException->() /var/www/html/admin/libraries/BMO/Media.class.php:34
  2. Whoops\Run->handleError() :0
  3. mkdir() /var/www/html/admin/libraries/BMO/Media.class.php:34
  4. FreePBX\Media->__construct() /var/www/html/admin/libraries/BMO/Self_Helper.class.php:125
  5. FreePBX\Self_Helper->autoLoad() /var/www/html/admin/libraries/BMO/Self_Helper.class.php:37
  6. FreePBX\Self_Helper->__get() /var/lib/asterisk/bin/retrieve_conf:40

Odd. I ran the commands mentioned earlier and fixed it (after noticing the same behavior on the module admin page).

I figured I’d start a new topic, but in case the two are related I’m getting “SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘reversal’ in ‘field list’” when adding an inbound route.

I have exactly the same issue as bwaynef running on a Raspbx system…

namely, the fwconsole service won’t start on a reboot. If I type:

fwconsole start

from the CLI, then it sets all the permissions and starts normally.

When I run:

amportal start

I get…

root@raspbx:/usr/local/sbin# amportal start

Please wait…
PHP Parse error: syntax error, unexpected ‘foreach’ (T_FOREACH) in Command line code on line 6

PHP Notice: Undefined variable: amp_conf in /var/lib/asterisk/bin/gen_amp_conf.php on line 18
PHP Warning: Invalid argument supplied for foreach() in /var/lib/asterisk/bin/gen_amp_conf.php on line 18
**** WARNING: ERROR IN CONFIGURATION ****
astrundir in ‘/etc/asterisk’ is set to but the directory
does not exist. Attempting to create it with:
'mkdir -p ’

mkdir: missing operand
Try `mkdir --help’ for more information.
**** ERROR: COULD NOT CREATE ****
Attempt to execute 'mkdir -p ’ failed with an exit code of 1
You must create this directory and the try again.
root@raspbx:/usr/local/sbin#

I think this happens because v13 installs fwconsole with default ownership and 744 permission(?) in /var/lib/asterisk/bin.

If your install does not set /var/lib/asterisk as the asterisk home directory then the default ownership of the folder is “root” instead of “asterisk” . So now asterisk has no ability to run fwconsole which is what is needed to do “fwconsole chown” and fix the permission.

“chown asterisk. /var/lib/asterisk/bin/fwconsole” followed by “fwconsole chown” should fix everything.