Problem description
I’m currently testing the upgrade to Icinga2 2.15, icingadb 1.4 and IcingaDB-Web 1.2.2
When clicking on ‘Migrations’, I get the following error message:
#0 /usr/share/php/Icinga/Application/ProvidedHook/DbMigration.php(21): Icinga\Application\ProvidedHook\DbMigration->getWebDb()
#1 /usr/share/php/Icinga/Application/Hook/DbMigrationHook.php(293): Icinga\Application\ProvidedHook\DbMigration->getDb()
#2 /usr/share/php/Icinga/Application/Hook/DbMigrationHook.php(172): Icinga\Application\Hook\DbMigrationHook->load()
#3 /usr/share/php/Icinga/Application/MigrationManager.php(306): Icinga\Application\Hook\DbMigrationHook->getMigrations()
#4 /usr/share/php/Icinga/Application/MigrationManager.php(56): Icinga\Application\MigrationManager->load()
#5 /usr/share/php/Icinga/Application/MigrationManager.php(106): Icinga\Application\MigrationManager->getPendingMigrations()
#6 /usr/share/php/Icinga/Application/MigrationManager.php(69): Icinga\Application\MigrationManager->count()
#7 /usr/share/php/Icinga/Application/MigrationManager.php(223): Icinga\Application\MigrationManager->hasPendingMigrations()
#8 /usr/share/icingaweb2/application/controllers/MigrationsController.php(58): Icinga\Application\MigrationManager->validateDatabasePrivileges()
#9 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action.php(528): Icinga\Controllers\MigrationsController->indexAction()
#10 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch()
#11 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Front.php(954): Icinga\Web\Controller\Dispatcher->dispatch()
#12 /usr/share/php/Icinga/Application/Web.php(294): Zend_Controller_Front->dispatch()
#13 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch()
#14 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#15 {main}
and this message in linux’s journal about every minute
Oct 10 12:09:09 icweb icingaweb2[85716]: Failed to load pending migrations: LogicException in /usr/share/php/Icinga/Common/Database.php:28 with message: Please check if a db instance exists at all
Assumption
I looked at the code (I’m no php-programer!) and found something like public const MYSQL_UPGRADE_DIR = 'schema/mysql-upgrades';.
So could the cause of these error messages be that, in my case, icingadb-daemon and as well the database are running on different servers?
I didn’t have this error with web module icingadb 1.1.3, where the migrations page simply says “No items found”.
Loaded Libraries
| icinga/icinga-php-library | 0.17.0 |
|---|---|
| icinga/icinga-php-thirdparty | 0.13.1 |
Loaded Modules
| icingadb | 1.2.2 | |
|---|---|---|
| cube | 1.3.3 | |
| grafana | 2.0.0b | |
| incubator | 0.23.0 |
- Icinga 2 version used (
icinga2 --version) 2.15.0