MIgration from Ombutel to VitalPBX database error

VitalPBX Community Support General Discussion MIgration from Ombutel to VitalPBX database error

  • Post
    DannyLarsen
    Participant
    none

    I am migrating an Ombutel to VitalPBX using the script on this page

    wget https://raw.githubusercontent.com/VitalPBX/OmbutelMigration/master/ombutel-to-vpbx.sh
    	
    	chmod +x ombutel-to-vpbx.sh
    	
    	./ombutel-to-vpbx.sh

    After running my web page shows this error  

    Fatal error: Uncaught exception ‘Exception’ with message ‘SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘ombutel.ombu_role_permissions’ doesn’t exist With Query: select `allowed` from `ombu_role_permissions` where `role_id` = ? and `permission` = ?’ in /usr/share/ombutel/www/includes/db.php:0 Stack trace: #0 /usr/share/ombutel/www/includes/db.php(0): ombuteldb::__construct() #1 /usr/share/ombutel/www/includes/db.php(0): ombuteldb->__construct() #2 /usr/share/ombutel/www/includes/role.php(0): ombuteldb::query() #3 /usr/share/ombutel/www/themes/vital_pbx/topBar.php(0): ombutelrole->has_permission_for() #4 /usr/share/ombutel/www/themes/vital_pbx/topBar.php(0): themesvital_pbxtopBar->_buildVerticalMenu() #5 /usr/share/ombutel/www/themes/vital_pbx/vital_pbx.php(0): themesvital_pbxtopBar->render() #6 /usr/share/ombutel/www/themes/page.php(0): themesvital_pbxvital_pbx->render() #7 /usr/share/ombutel/www/themes/page.php(0): themespage->_buildBody() #8 /usr/share/ombutel/www/includes/app in /usr/share/ombutel/www/includes/db.php on line 0

     

    So then I ran  usr/share/ombutel/php scripts/apply_patches  with the following result

    php scripts/apply_patches
    Importing 20170330.2.directdial_feature_codes.sql…
    PHP Fatal error: Uncaught exception ‘Exception’ with message ‘ERROR 1062 (23000) at line 5: Duplicate entry ‘direct_toggle_cfi’ for key ‘feature_name’
    ‘ in /usr/share/ombutel/scripts/apply_patches:0
    Stack trace:
    #0 /usr/share/ombutel/scripts/apply_patches(0): patcher::shellcmd()
    #1 /usr/share/ombutel/scripts/apply_patches(0): patcher->shellcmd()
    #2 /usr/share/ombutel/scripts/apply_patches(0): patcher->import_dbscript()
    #3 /usr/share/ombutel/scripts/apply_patches(0): patcher->apply()
    #4 {main}
    thrown in /usr/share/ombutel/scripts/apply_patches on line 0

    Can you help me please

    Thank you

     

     

    0
Viewing 15 replies - 1 through 15 (of 16 total)
  • Replies
    Up
    0
    Down

    Try to execute the following command:

    mysql -uroot ombutel -e"insert into ombu_patches (`filename`) values ('20170330.2.directdial_feature_codes.sql')"

    Then, run again the following script:

    /usr/share/ombutel/scripts/apply_patches
    0
    DannyLarsen
    Participant
    none
    Up
    0
    Down

    I get this error

    -bash: filename: command not found
    ERROR 1136 (21S01) at line 1: Column count doesn’t match value count at row 1

    0
    Up
    0
    Down

    executing which command?

    0
    DannyLarsen
    Participant
    none
    Up
    0
    Down
    mysql -uroot ombutel -e"insert into ombu_patches (`filename`) values ('20170330.2.directdial_feature_codes.sql')"
    0
    Up
    0
    Down

    Try in the following way:

    mysql -uroot ombutel -e"insert into ombu_patches(filename) values ('20170330.2.directdial_feature_codes.sql')"
    0
    DannyLarsen
    Participant
    none
    Up
    0
    Down

    That worked but when I run the patch I get this now

    Importing 20170710.pin-lists.sql…
    PHP Fatal error: Uncaught exception ‘Exception’ with message ‘ERROR 1050 (42S01) at line 2: Table ‘ombu_pin_list_entries’ already exists
    ‘ in /usr/share/ombutel/scripts/apply_patches:0
    Stack trace:
    #0 /usr/share/ombutel/scripts/apply_patches(0): patcher::shellcmd()
    #1 /usr/share/ombutel/scripts/apply_patches(0): patcher->shellcmd()
    #2 /usr/share/ombutel/scripts/apply_patches(0): patcher->import_dbscript()
    #3 /usr/share/ombutel/scripts/apply_patches(0): patcher->apply()
    #4 {main}
    thrown in /usr/share/ombutel/scripts/apply_patches on line 0

    0
    Up
    0
    Down

    Looks like the ombu_patches table is corrupted. You must to cotinue doing the same process for messages like this:

    Importing 20170710.pin-lists.sql...
    PHP Fatal error: Uncaught exception 'Exception' with message 'ERROR 1050 (42S01) at line 2: Table 'ombu_pin_list_entries' already exists
    ' in /usr/share/ombutel/scripts/apply_patches:0

     

    mysql -uroot ombutel -e"insert into ombu_patches(filename) values ('20170710.pin-lists.sql')"
    0
    DannyLarsen
    Participant
    none
    Up
    0
    Down

    OK I got it, I had to do a few more then it completed the patch with no error

    Thank you

    0
    dsmagghe
    Participant
    Up
    0
    Down

    after that I get:

    Executing 20180625.5.migrate_destinations.php…
    PHP Fatal error: Uncaught exception ‘Exception’ with message ‘SQLSTATE[42S22]: Column not found: 1054 Unknown column ’48f2e5306f01fb3b35c3f869d023f646.mod_dest’ in ‘field list’ With Query: select `48f2e5306f01fb3b35c3f869d023f646`.`queue_id` as `queue_id`,`48f2e5306f01fb3b35c3f869d023f646`.`extension` as `extension`,`48f2e5306f01fb3b35c3f869d023f646`.`queue_vip_list_id` as `queue_vip_list_id`,`48f2e5306f01fb3b35c3f869d023f646`.`ivr_id` as `ivr_id`,`48f2e5306f01fb3b35c3f869d023f646`.`cron_profile_id` as `cron_profile_id`,`48f2e5306f01fb3b35c3f869d023f646`.`description` as `description`,`48f2e5306f01fb3b35c3f869d023f646`.`prefix` as `prefix`,`48f2e5306f01fb3b35c3f869d023f646`.`mod_dest` as `mod_dest`,`48f2e5306f01fb3b35c3f869d023f646`.`destination` as `destination`,`48f2e5306f01fb3b35c3f869d023f646`.`mod_hangup_dest` as `mod_hangup_dest`,`48f2e5306f01fb3b35c3f869d023f646`.`hangup_dest` as `hangup_dest`,`48f2e5306f01fb3b35c3f869d023f646`.`strategy` as `strategy`,`48f2e5306f01fb3b35c3f869d023f646`.`music_group_id` as `music_group in /usr/share/ombutel/www/includes/db.php on line 0
    [root@voip09-dierick scripts]#

    0
    Up
    0
    Down

    Looks like the VPBX installation is corrupted, try to reinstall it again:

    yum reinstall vitalpbx

    Then, apply the patches if needed:

    /usr/share/ombutel/scripts/apply_patches
    0
    dsmagghe
    Participant
    Up
    0
    Down

    [root@voip01 ~]# rm -rf /var/cache/yum
    [root@voip01 ~]# yum reinstall vitalpbx
    Loaded plugins: auto-update-debuginfo, fastestmirror
    No Match for argument: vitalpbx
    LowayResearch | 951 B 00:00:00
    base | 3.6 kB 00:00:00
    base-debuginfo | 2.5 kB 00:00:00
    epel/x86_64/metalink | 25 kB 00:00:00
    epel | 3.2 kB 00:00:00
    epel-debuginfo/x86_64/metalink | 29 kB 00:00:00
    epel-debuginfo | 1.5 kB 00:00:00
    extras | 3.4 kB 00:00:00
    treasuredata | 2.9 kB 00:00:00
    updates | 3.4 kB 00:00:00
    (1/10): base/7/x86_64/group_gz | 166 kB 00:00:00
    (2/10): epel/x86_64/group_gz | 88 kB 00:00:00
    (3/10): epel/x86_64/primary | 3.6 MB 00:00:00
    (4/10): base-debuginfo/x86_64/primary_db | 2.3 MB 00:00:00
    (5/10): extras/7/x86_64/primary_db | 187 kB 00:00:00
    (6/10): base/7/x86_64/primary_db | 5.9 MB 00:00:00
    (7/10): epel/x86_64/updateinfo | 945 kB 00:00:00
    (8/10): treasuredata/7/x86_64/primary_db | 44 kB 00:00:00
    (9/10): epel-debuginfo/x86_64/primary | 510 kB 00:00:00
    (10/10): updates/7/x86_64/primary_db | 6.0 MB 00:00:00
    LowayResearch/primary | 8.6 kB 00:00:00
    Determining fastest mirrors
    * base: ams.edge.kernel.org
    * epel: mirror.nl.leaseweb.net
    * epel-debuginfo: mirror.nl.leaseweb.net
    * extras: centos.mirror.transip.nl
    * updates: centos.mirror.transip.nl
    LowayResearch 52/52
    epel 12695/12695
    epel-debuginfo 2822/2822
    Error: Nothing to do

     

     

    got this when trying to reinstall… the installation doesn’t work now…

    0
    dsmagghe
    Participant
    Up
    0
    Down

    and when executing the script again

    Installed size: 7.1 M
    Downloading packages:
    (1/2): vitalpbx-sounds-es-2.0.5-5.x86_64.rpm | 3.0 MB 00:00:01
    (2/2): vitalpbx-sounds-2.0.5-5.x86_64.rpm | 3.0 MB 00:00:01
    ————————————————————————————————————————————————————————
    Total 4.9 MB/s | 6.0 MB 00:00:01
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
    Installing : vitalpbx-sounds-2.0.5-5.x86_64 1/2
    Installing : vitalpbx-sounds-es-2.0.5-5.x86_64 2/2
    Verifying : vitalpbx-sounds-es-2.0.5-5.x86_64 1/2
    Verifying : vitalpbx-sounds-2.0.5-5.x86_64 2/2

    Installed:
    vitalpbx-sounds.x86_64 0:2.0.5-5 vitalpbx-sounds-es.x86_64 0:2.0.5-5

    Complete!
    Loaded plugins: auto-update-debuginfo, fastestmirror
    Cleaning repos: LowayResearch base epel extras treasuredata updates
    Cleaning up everything
    Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
    Cleaning up list of fastest mirrors
    Welcome to VitalPBX!
    /bin/bash: /etc/profile.d/vitalwelcome.sh: No such file or directory
    [root@voip01 ~]#

     

     

    and no 

    0
    dsmagghe
    Participant
    Up
    0
    Down

    [root@voip01 ~]# yum reinstall vitalpbx
    Loaded plugins: auto-update-debuginfo, fastestmirror
    No Match for argument: vitalpbx
    Loading mirror speeds from cached hostfile
    * base: mirrors.supportex.net
    * epel: http://ftp.nluug.nl
    * epel-debuginfo: http://ftp.nluug.nl
    * extras: http://ftp.nluug.nl
    * updates: http://ftp.nluug.nl
    Error: Nothing to do
    [root@voip01 ~]#

    0
    Ofloo
    Participant
    Up
    0
    Down

    I’ve been trying to upgrade now for a while but this is what the upgrade always resolves into

     


    Fatal error: Uncaught exception 'Exception' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ombutel.ombu_role_permissions' doesn't exist With Query: select `allowed` from `ombu_role_permissions` where `role_id` = ? and `permission` = ?' in /usr/share/ombutel/www/includes/db.php:0 Stack trace: #0 /usr/share/ombutel/www/includes/db.php(0): ombuteldb::__construct() #1 /usr/share/ombutel/www/includes/db.php(0): ombuteldb->__construct() #2 /usr/share/ombutel/www/includes/role.php(0): ombuteldb::query() #3 /usr/share/ombutel/www/themes/vital_pbx/topBar.php(0): ombutelrole->has_permission_for() #4 /usr/share/ombutel/www/themes/vital_pbx/topBar.php(0): themesvital_pbxtopBar->_buildVerticalMenu() #5 /usr/share/ombutel/www/themes/vital_pbx/vital_pbx.php(0): themesvital_pbxtopBar->render() #6 /usr/share/ombutel/www/themes/page.php(0): themesvital_pbxvital_pbx->render() #7 /usr/share/ombutel/www/themes/page.php(0): themespage->_buildBody() #8 /usr/share/ombutel/www/includes/app in /usr/share/ombutel/www/includes/db.php on line 0
    0
    dsmagghe
    Participant
    Up
    0
    Down

    try executing /usr/share/ombutel/scripts/apply_patches

    and make sure this one runs correctly

    0
Viewing 15 replies - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.