Upgrading from FreePBX 10.13.66 to SNG7, Cannot connect to Asterisk


(Gmt) #1

The upgrade to the current distro resulting in asterisk no longer being found/running/dead phones. I am running the repair process to see what happens but it is throwing a lot errors so I have very low hopes at this point.

[root@FreePBX ~]# ./post_upgrade
######### Starting upgrade repair on Mon Nov 18 22:18:50 UTC 2019 #########
######### Cleaning old EL5 and EL6 packages #########
######### Enabling and starting mariadb #########
######### Running mysql_upgrade #########
######### Attempting to check for internet connectivity #########
######### Verified internet connectivity #########
######### Removing known bad RPMs #########
######### Running initial yum update #########
######### Updating Dahdi for this kernel #########
######### Removing packages that will give us problems on blanket yum update #########
######### Running yum upgrade (This could take a long time!) #########
######### Before we update downgrade packages in case they were from other sources #########
######### Removing old packages that are no longer needed #########
######### Removing PBX Modules that are tied to a PHP Version #########
######### Removed module areminder #########
######### Removed module broadcast #########
######### Removed module callerid #########
######### Removed module calllimit #########
######### Removed module conferencespro #########
######### Removed module cos #########
######### Removed module endpoint #########
######### Removed module extensionroutes #########
######### Removed module faxpro #########
######### Removed module freepbx_ha #########
######### Removed module pagingpro #########
######### Removed module parkpro #########
######### Removed module pinsetspro #########
######### Removed module pms #########
######### Removed module queuestats #########
######### Removed module qxact_reports #########
######### Removed module recording_report #########
######### Removed module restapps #########
######### Removed module sangomacrm #########
######### Removed module sysadmin #########
######### Removed module vega #########
######### Removed module vmnotify #########
######### Removed module voicemail_report #########
######### Removed module vqplus #########
######### Removed module webcallback #########
######### Removed module zulu #########
######### Get a list of modules that are disabled, to attempt to re-disable later #########
######### Module modulename is in a disabled state #########
######### Module areminder is in a disabled state #########
######### Module broadcast is in a disabled state #########
######### Module callerid is in a disabled state #########
######### Module calllimit is in a disabled state #########
######### Module conferencespro is in a disabled state #########
######### Module extensionroutes is in a disabled state #########
######### Module faxpro is in a disabled state #########
######### Module freepbx_ha is in a disabled state #########
######### Module pagingpro is in a disabled state #########
######### Module parkpro is in a disabled state #########
######### Module qxact_reports is in a disabled state #########
######### Module recording_report is in a disabled state #########
######### Module restapi is in a disabled state #########
######### Module restapps is in a disabled state #########
######### Module vmnotify is in a disabled state #########
######### Module webcallback is in a disabled state #########
######### Module xmpp is in a disabled state #########
######### Starting Asterisk #########
######### Updating PBX Version #########
######### Checking for proper fwconsole installation #########
######### Updating ‘framework’ #########
######### Updating ‘core’ #########
######### Skip module cache #########
######### Forcing enabling all modules, in case anything was disabled #########
######### Updating remaining modules #########
No repos specified, using: [unsupported,commercial,standard,extended] from last GUI settings

Module(s) requiring upgrades: findmefollow, restapi, sipsettings, sipstation
Upgrading module ‘sipsettings’ from 14.0.27.17 to 14.0.27.17
Downloading module ‘sipsettings’
Processing sipsettings
Verifying local module download…Verified
Extracting…Done
Download completed in 2 seconds
checking for sipsettings table…already exists

In Database.class.php line 212:

SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘asterisk.kvstore
_Sipsettings’ doesn’t exist

moduleadmin [-f|–force] [-d|–debug] [–edge] [–stable] [–color] [–skipchown] [-e|–autoenable] [–skipdisabled] [–snapshot SNAPSHOT] [–format FORMAT] [-R|–repo REPO] [-t|–tag TAG] [–sendemail] [–onlystdout] [–] []…

Upgrading module ‘findmefollow’ from 14.0.1.23 to 14.0.1.23
Downloading module ‘findmefollow’
Processing findmefollow
Verifying local module download…Verified
Extracting…Done
Download completed in 2 seconds
Updating tables findmefollow…Done

In php-asmanager.php line 242:

Asterisk is not connected

moduleadmin [-f|–force] [-d|–debug] [–edge] [–stable] [–color] [–skipchown] [-e|–autoenable] [–skipdisabled] [–snapshot SNAPSHOT] [–format FORMAT] [-R|–repo REPO] [-t|–tag TAG] [–sendemail] [–onlystdout] [–] []…

Upgrading module ‘restapi’ from 13.0.21.2 to 13.0.21.2
Downloading module ‘restapi’
Processing restapi
Downloading…
81057/81057 [============================] 100%
Finished downloading
Extracting…Done
Download completed in 3 seconds
Generating CSS…Done
Module restapi version 13.0.21.2 successfully installed
Updating Hooks…Done
Upgrading module ‘sipstation’ from 14.0.4.1 to 14.0.4.1
Downloading module ‘sipstation’
Processing sipstation
Verifying local module download…Verified
Extracting…Done
Download completed in 2 seconds
Detected Missing Dependency of: sipsettings 13.0.26
Found local Dependency of: sipsettings 14.0.27.17
Installing Missing Dependency of: sipsettings 13.0.26
checking for sipsettings table…already exists

In Database.class.php line 212:

SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘asterisk.kvstore
_Sipsettings’ doesn’t exist

moduleadmin [-f|–force] [-d|–debug] [–edge] [–stable] [–color] [–skipchown] [-e|–autoenable] [–skipdisabled] [–snapshot SNAPSHOT] [–format FORMAT] [-R|–repo REPO] [-t|–tag TAG] [–sendemail] [–onlystdout] [–] []…

All upgrades completed successfully!
Updating Hooks…Done
######### Repairing PHP Version specific modules #########
######### Ensuring sysadmin is enabled and up to date #########
######### Repairing areminder #########
######### Repairing broadcast #########
######### Repairing callerid #########
######### Repairing calllimit #########
######### Repairing conferencespro #########
######### Repairing cos #########
######### Repairing endpoint #########
######### Repairing extensionroutes #########
######### Repairing faxpro #########
######### Repairing freepbx_ha #########
######### Repairing pagingpro #########
######### Repairing parkpro #########
######### Repairing pinsetspro #########
######### Repairing pms #########
######### Repairing queuestats #########
######### Repairing qxact_reports #########
######### Repairing recording_report #########
######### Repairing restapps #########
######### Repairing sangomacrm #########
######### Repairing vmnotify #########
######### Repairing voicemail_report #########
######### Repairing vqplus #########
######### Repairing webcallback #########
######### Repairing zulu #########
######### Adding new modules #########
######### Re-running install to ensure database is correct #########
######### Removing bria Module #########
######### Attempting to disable any modules that was previously disabled #########
######### Attempting to re-disable the module modulename #########
Error running fwconsole ma disable modulename - Retrying. Output was:
The following error(s) occured:

  • Specified module not found
    ######### Attempting to re-disable the module areminder #########
    Error running fwconsole ma disable areminder - Retrying. Output was:
    The following error(s) occured:
  • Module not enabled: cannot disable
    ######### Attempting to re-disable the module broadcast #########
    Error running fwconsole ma disable broadcast - Retrying. Output was:
    The following error(s) occured:
  • Module not enabled: cannot disable
    ######### Attempting to re-disable the module callerid #########
    Error running fwconsole ma disable callerid - Retrying. Output was:
    The following error(s) occured:
  • Module not enabled: cannot disable
    ######### Attempting to re-disable the module calllimit #########
    Error running fwconsole ma disable calllimit - Retrying. Output was:
    The following error(s) occured:
  • Module not enabled: cannot disable
    ######### Attempting to re-disable the module conferencespro #########
    Error running fwconsole ma disable conferencespro - Retrying. Output was:
    The following error(s) occured:
  • Module not enabled: cannot disable
    ######### Attempting to re-disable the module extensionroutes #########
    Error running fwconsole ma disable extensionroutes - Retrying. Output was:
    The following error(s) occured:
  • Module not enabled: cannot disable
    ######### Attempting to re-disable the module faxpro #########
    Error running fwconsole ma disable faxpro - Retrying. Output was:
    The following error(s) occured:
  • Module not enabled: cannot disable
    ######### Attempting to re-disable the module freepbx_ha #########
    Error running fwconsole ma disable freepbx_ha - Retrying. Output was:
    The following error(s) occured:
  • Module not enabled: cannot disable
    ######### Attempting to re-disable the module pagingpro #########
    Error running fwconsole ma disable pagingpro - Retrying. Output was:
    The following error(s) occured:
  • Module not enabled: cannot disable
    ######### Attempting to re-disable the module parkpro #########
    Error running fwconsole ma disable parkpro - Retrying. Output was:
    The following error(s) occured:
  • Module not enabled: cannot disable
    ######### Attempting to re-disable the module qxact_reports #########
    Error running fwconsole ma disable qxact_reports - Retrying. Output was:
    The following error(s) occured:
  • Module not enabled: cannot disable
    ######### Attempting to re-disable the module recording_report #########
    Error running fwconsole ma disable recording_report - Retrying. Output was:
    The following error(s) occured:
  • Module not enabled: cannot disable
    ######### Attempting to re-disable the module restapi #########
    ######### Attempting to re-disable the module restapps #########
    Error running fwconsole ma disable restapps - Retrying. Output was:
    The following error(s) occured:
  • Module not enabled: cannot disable
    ######### Attempting to re-disable the module vmnotify #########
    Error running fwconsole ma disable vmnotify - Retrying. Output was:
    The following error(s) occured:
  • Module not enabled: cannot disable
    ######### Attempting to re-disable the module webcallback #########
    Error running fwconsole ma disable webcallback - Retrying. Output was:
    The following error(s) occured:
  • Module not enabled: cannot disable
    ######### Attempting to re-disable the module xmpp #########
    ######### Updating httpd.conf #########
    Generating grub configuration file …
    Found linux image: /boot/vmlinuz-3.10.0-957.21.3.el7.x86_64
    Found initrd image: /boot/initramfs-3.10.0-957.21.3.el7.x86_64.img
    Found linux image: /boot/vmlinuz-3.10.0-957.10.1.el7.x86_64
    Found initrd image: /boot/initramfs-3.10.0-957.10.1.el7.x86_64.img
    Found linux image: /boot/vmlinuz-redhat-upgrade-tool
    done
    ######### Running System Configuration hooks #########
    ######### - Running config-pnpd #########
    ######### - Running config-postfix #########
    Skipping crontab-update
    ######### - Running fail2ban-generate #########
    ######### - Running update-dns #########
    ######### - Running update-dnsmasq #########
    ######### - Running update-hostname #########
    ######### - Running update-ports #########
    ######### - Running update-timezone #########
    ######### Starting PBX #########
    ######### Update license #########
    Updating license for 22364523
    Done!
    No changes from original Licence.
    ######### Running final PBX Reload #########
    Error running fwconsole reload - Retrying. Output was:
    Reloading FreePBX
    Error(s) have occured, the following is the retrieve_conf output:
    exit: 1

Error running fwconsole reload - Retrying. Output was:
Reloading FreePBX
Error(s) have occured, the following is the retrieve_conf output:
exit: 1

Error running fwconsole reload - Retrying. Output was:
Reloading FreePBX
Error(s) have occured, the following is the retrieve_conf output:
exit: 1

######### Finished post_upgrade on Mon Nov 18 22:24:52 UTC 2019 #########
######### Rebooting one more time #########


(Gmt) #2

The repair didn’t help, system still dead. I’m going to snapshot the current state in case someone has a solution, then roll back to the working version 12.


#3

This should create the table (from bash)

mysql asterisk -e "CREATE TABLE `kvstore_Sipsettings` (
  `key` char(255) COLLATE utf8_unicode_ci NOT NULL,
  `val` varchar(4096) COLLATE utf8_unicode_ci DEFAULT NULL,
  `type` char(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  `id` char(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  UNIQUE KEY `uniqueindex` (`key`(190),`id`(190)),
  KEY `keyindex` (`key`(190)),
  KEY `idindex` (`id`(190))
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;"

(Itzik) #4

Go to advanced settings, click submit and start Asterisk

fwconsole restart


(Gmt) #5

Hmmm, I got the following output when trying to make this change:

[root@FreePBX ~]# mysql asterisk -e "CREATE TABLE kvstore_Sipsettings (

key char(255) COLLATE utf8_unicode_ci NOT NULL,
val varchar(4096) COLLATE utf8_unicode_ci DEFAULT NULL,
type char(16) COLLATE utf8_unicode_ci DEFAULT NULL,
id char(255) COLLATE utf8_unicode_ci DEFAULT NULL,
UNIQUE KEY uniqueindex (key(190),id(190)),
KEY keyindex (key(190)),
KEY idindex (id(190))
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;"
-bash: kvstore_Sipsettings: command not found
-bash: key: command not found
-bash: val: command not found
-bash: uniqueindex: command not found
-bash: key: command not found
-bash: keyindex: command not found
-bash: key: command not found
-bash: idindex: command not found
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘(
char(255) COLLATE utf8_unicode_ci NOT NULL,
varchar(4096) COLLATE utf8_u’ at line 1
[root@FreePBX ~]#


#6

You didn’t get into mysql, do you have a root password set?

Either way, get into mysql and just paste the CREATE TABLE statement.


(Gmt) #7

I tried that and it didn’t help. After hitting submit I then clicked the red apply config button and got the following error:

exit: 1
Unable to continue. Unable to locate the FreePBX BMO Class 'Sipsettings’A required module might be disabled or uninstalled. Recommended steps (run from the CLI): 1) fwconsole ma install sipsettings 2) fwconsole ma enable sipsettings in /var/www/html/admin/libraries/BMO/Self_Helper.class.php on line 213
#0 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(106): FreePBX\Self_Helper->loadObject(‘Sipsettings’)
#1 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(37): FreePBX\Self_Helper->autoLoad(‘Sipsettings’)
#2 /var/www/html/admin/modules/motif/functions.inc.php(9): FreePBX\Self_Helper->__get(‘Sipsettings’)
#3 /var/www/html/admin/libraries/BMO/DialplanHooks.class.php(95): motif_get_config(‘asterisk’)
#4 /var/lib/asterisk/bin/retrieve_conf(860): FreePBX\DialplanHooks->processHooks(‘asterisk’, Array)
#5 {main}

From there I started looking at module problems and the module administation screen won’t allow me to modify a module to upgrade them. Maybe I don’t understand some new paradigm on how the window is supposed to work?


#8

Oh well, it worked for me upgrading 14 to 15 a week ago.


(Gmt) #9

Obviously I don’t know how to get around in mysql, or more accurately mariadb, as pasting the create table command does nothing but leave me in a series of > prompts with no end. Gonna bounce back to version 12 cause it still works and wait until I see some complete instructions or explanation why tables are missing from the database now.


#10

the > is en expectation of a pending end of a statement character, all statements end with a semicolon(;)


(Gmt) #11

So, to be clear, when I do this all over again and wind up in the same ditch I need to get into mysql/mariadb then paste the create table statement without the " "? Do I ignore the asterisk -e you had in your original post?

While I understand this is a highly complex upgrade, there is nothing complex about my environment nor have I done anything odd to the system. I have not had any of the upgrades proceed without creating some sort of issue I have to clean up, such as modules that need to be upgraded. I just finished an upgrade and the dashboard is throwing errors about module versions?

I’m still trying to figure out how beating my head against this wall make sense as opposed to a fresh install and importing the settings using the migration tool.


#12

I would go with a fresh install, it will likely be easier to understand.


(Gmt) #13

I guess I am going to have to get with Sangoma as I have commercial modules tied to this installation ID. Not sure how that is going to work out either.

Should I have started with whiskey, or pulled my toenails off without inebriation?


(Moussa) #14

If you still able to reset the System Activation then you can follow these steps to move the system to a new install
https://wiki.freepbx.org/display/FPAS/How+to+Move+a+PBX+Deployment+to+a+New+PBX


(system) closed #15

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