Trunks Not Restored


#1

Hi, i have updated the distro freepbx to latest version 15.0.17.24 and asterisk to 16.15.1 on both my serves and now i run into a problem, when i do restore to the backup server the Trunks are not restoring, i got this error :
There were errors during the restore process
SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 39 of file /var/www/html/admin/modules/core/Restore/Trunks.php


(Kapil Gupta) #2

Hi, @Edmond Are you using v15.0.12.51 of the Core module? if not then please update the core module by fwconsole ma downloadinstall core --edge .

thanks.


#3

yes i am using core module v15.0.12.51


#4

i had a backup 2 weeks old (core module v15.0.12.46) and restore it and that works but with latest update doesn’t work


#5

any idea ?


(Kamil) #6

Hello,

I’m glad I’m not the only one with this issue. I have updated core module using edge repo as advised by @kgupta1 but it is still not restoring. Updated both source and destination servers.
Please find below error:
Processing Trunks SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 39 of file /var/www/html/admin/modules/core/Restore/Trunks.php #0 /var/www/html/admin/modules/core/Restore/Trunks.php(39): PDOStatement->execute(Array) #1 /var/www/html/admin/modules/core/Restore/Trunks.php(13): FreePBX\modules\Core\Restore\Trunks->updateTrunks(Array) #2 /var/www/html/admin/modules/core/Restore.php(53): FreePBX\modules\Core\Restore\Trunks->setConfigs(Array) #3 /var/www/html/admin/modules/backup/Handlers/Restore/Common.php(138): FreePBX\modules\Core\Restore->runRestore() #4 /var/www/html/admin/modules/backup/Handlers/Restore/Common.php(126): FreePBX\modules\Backup\Handlers\Restore\Common->runRestore(Object(FreePBX\modules\Core\Restore)) #5 /var/www/html/admin/modules/backup/Handlers/Restore/Multiple.php(56): FreePBX\modules\Backup\Handlers\Restore\Common->processModule('core', '15.0.12.51') #6 /var/www/html/admin/modules/backup/Console/Backup.class.php(324): FreePBX\modules\Backup\Handlers\Restore\Multiple->process(false) #7 /var/www/html/admin/libraries/Composer/vendor/symfony/console/Command/Command.php(255): FreePBX\Console\Command\Backup->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #8 /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php(960): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #9 /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(FreePBX\Console\Command\Backup), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #10 /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/lib/asterisk/bin/fwconsole(163): Symfony\Component\Console\Application->run() #12 {main}


(Itzik) #7

Please report this: issues.freepbx.org


(Kamil) #8

Whoever experiences the same problem here is the ticket:
https://issues.freepbx.org/browse/FREEPBX-22332


(Kapil Gupta) #9

Please upgrade to the latest Core v15.0.12.53 which has the fix for this reported issue.

Best Regards
Kapil


#10

I have the same issue, and am using Core 15.0.12.55. It appears that this affects warm spare exports as well. So the problem is not resolved per my experience. Any help would be greatly appreciated.


(Tom Ray) #11

Wow. Second time in 45 days Core has broken outside modules that depend on it. QA needs to be better.


(Alsur2) #12

any idea? I have the same issue


#13

I was bitten by the same bug, running core 15.0.12.51 on both source and destination systems.

So I did
fwconsole ma downloadinstall core --tag 15.0.12.53
on the destination system only, retried the restore, success!

OK, so did the bug get ‘restored’ in Core 15.0.12.55 ? Or, is it a subtle problem that was only partially fixed?


(Hawk McDuck) #14

Anybody know for sure if this “Trunks Not Restored” issue has been addressed in the GA load, and if not, when we can expect it?

$ sudo fwconsole ma list | grep core
| core | 15.0.12.55 | Enabled | GPLv3+ |
$


(Hawk McDuck) #15

I answered my own question. The ticket has been closed.

https://issues.freepbx.org/browse/FREEPBX-22449?jql=project%20%3D%20FREEPBX%20AND%20issuetype%20%3D%20Bug%20AND%20text%20~%20"backup"%20ORDER%20BY%20created%20DESC

OK, it looks as though the issue was the fact that the PBXes were not activated prior to running the restore procedure. Thanks for the help. We can close the ticket.