Missing Table Ombu_Tenant_Dids after update to 3.1.3 R1

Hello,

after updating to latest release, every time we create or edit an extension, we get the following error message:

Exception : SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘ombutel.ombu_tenant_dids’ doesn’t exist With Query: select did from ombu_tenant_dids where tenant_id = ? at file /usr/share/vitalpbx/www/includes/db.php on line 0

Error Trace

# File Function
1 /usr/share/vitalpbx/www/index.php:0 app\Core->run(…args);
2 /usr/share/vitalpbx/www/includes/app/Core.php:0 app\Core->_applyAsteriskConfigurations(…args);
3 /usr/share/vitalpbx/www/includes/app/Core.php:0 vitalpbx\OmbuSystemConf->applyConfigUI(…args);
4 /usr/share/vitalpbx/www/includes/OmbuSystemConf.php:0 vitalpbx\OmbuSystemConf->_ApplyDialPlan(…args);
5 /usr/share/vitalpbx/www/includes/OmbuSystemConf.php:0 modules\inbound_route\inbound_route->getDialPlan(…args);
6 /usr/share/vitalpbx/www/modules/inbound_route/inbound_route.php:0 modules\inbound_route\Asterisk\DialPlan->build(…args);
7 /usr/share/vitalpbx/www/modules/inbound_route/Asterisk/DialPlan.php:0 modules\tenants\Asterisk\DialPlan->buildIncoming(…args);
8 /usr/share/vitalpbx/www/modules/tenants/Asterisk/DialPlan.php:0 modules\tenants\Asterisk\DialPlan->modules\tenants\Asterisk{closure}(…args);
9 /usr/share/vitalpbx/www/modules/tenants/Asterisk/DialPlan.php:0 vitalpbx\tenant->getInboundDIDs(…args);
10 /usr/share/vitalpbx/www/includes/tenant.php:0 modules\tenants\DIDNumber->getAllByTenant(…args);
11 /usr/share/vitalpbx/www/modules/tenants/DIDNumber.php:0 vitalpbx\db->query(…args);
12 /usr/share/vitalpbx/www/includes/db.php:0 vitalpbx\db->__construct(…args);

Steps to reproduce:

  • add a new extension or edit an existing extension
  • save
  • press Reload button
  • the error message appears every time you reload the settings

After checking the database, indeed table ombu_tenant_dids table does not exist.
As this error never happened before, I assume this is a bug introduced in latest release 3.1.3 R1.

This should be set as Highest Priority as all systems are unusable.

Try the following.

  • Go to the Linux Console
  • Execute the command below.
yum reinstall vitalpbx-multi-tenant -y

FYI, No data is lost during the reinstall of the add-ons or any other VitalPBX package.

If you get any error during the reinstall, please, post it here.

as per your suggestion, I have executed the yum reinstall command, which resulted in :slight_smile:
Resolving Dependencies
→ Running transaction check
—> Package vitalpbx-multi-tenant.x86_64 0:3.0.4-1 will be reinstalled
→ Finished Dependency Resolution

Ending result:
Stack trace:
#0 /usr/share/vitalpbx/scripts/apply_migrations(0): patcher->shellcmd(’/bin/bash -c se…’)
#1 /usr/share/vitalpbx/scripts/apply_migrations(0): patcher->import_dbscript(‘mt.1.dids_tbl.s…’, ‘/usr/share/vita…’)
#2 /usr/share/vitalpbx/scripts/apply_migrations(0): patcher->apply(‘migrations/mult…’)
#3 {main}
thrown in /usr/share/vitalpbx/scripts/apply_migrations on line 0
Verifying : vitalpbx-multi-tenant-3.0.4-1.x86_64 1/1

Installed:
vitalpbx-multi-tenant.x86_64 0:3.0.4-1

Complete!

So, no issues with Yum.

I then connected to the Mysql/MariaDB CLI and:

show tables;
| ombu_storage_notifications |
| ombu_tenant_settings |
| ombu_tenant_trunks |
| ombu_tenants |
| ombu_tenants_users |
| ombu_time_conditions |

so it is still missing…

Well, for some reason is not installing the mt.1.dids_tbl.sql migration. Are you using a password for the root user?

I will assume you’re referring to the Databsase root user , right? if so, yes, i am. But i can also log as vitalpbx user.
If you’re referring to Linux SSH login, then yes, I’m logged as root…

I meant, did you assign a password for the root user of the MySQL(MariaDB) database?

additionally, I have just re-run the YUM reinstall command, and there is the error (which I previously missed … sorry…)

Blockquote
Running transaction
Installing : vitalpbx-multi-tenant-3.0.4-1.x86_64 1/1
Table ombutel.ombu_patches does not exist, assuming new installation.
Importing mt.1.dids_tbl.sql…
PHP Fatal error: Uncaught Exception: ERROR 1044 (42000) at line 2: Access denied for user ‘’@‘localhost’ to database ‘ombutel’
in /usr/share/vitalpbx/scripts/apply_migrations:0
Stack trace:
#0 /usr/share/vitalpbx/scripts/apply_migrations(0): patcher->shellcmd(’/bin/bash -c se…’)
#1 /usr/share/vitalpbx/scripts/apply_migrations(0): patcher->import_dbscript(‘mt.1.dids_tbl.s…’, ‘/usr/share/vita…’)
#2 /usr/share/vitalpbx/scripts/apply_migrations(0): patcher->apply(‘migrations/mult…’)
#3 {main}
thrown in /usr/share/vitalpbx/scripts/apply_migrations on line 0
Verifying : vitalpbx-multi-tenant-3.0.4-1.x86_64 1/1
Installed:
vitalpbx-multi-tenant.x86_64 0:3.0.4-1

the line

Blockquote
PHP Fatal error: Uncaught Exception: ERROR 1044 (42000) at line 2: Access denied for user ‘’@‘localhost’ to database ‘ombutel’

says it all… Shouldn’t the install use the access specified in the database configuration script in VitalPBX??

No, root has no password to access DB…

and I can access DB command line without specifying a user (just plain-old mysql cmd) but have no access to any other database besides the information_schema

Your system seems broken!

Check the database configurations in the file below.

/etc/vitalpbx/database.conf

Currently it is:

[app]
database=ombutel
port=3306
host=localhost
username=ombutel
password=

[main]
host=localhost
port=3306
username=root
password=

I’m almost sure it is setup like this since July 2021, when the license was installed…

ok… I managed to remotely log into MariaDB as root and update the root@localhost password, and modified /etc/vitalpbx/database.conf with the new password.
After re-running the YUM command, update ran as expected.

Connected to MariaDB CLI and:

show tables;
| ombu_static_leases |
| ombu_storage_notifications |
| ombu_tenant_dids |
| ombu_tenant_settings |
| ombu_tenant_trunks |
| ombu_tenants |
| ombu_tenants_users |

Ombu_Tenant_DIDs table is now present!

Thanks for your help (and pacience :upside_down_face: )

1 Like