Hi all!
I’ve a problem with schema migration (Settings->System-Migration) after update to 2.12. On a host with MariaDB on a other host with connection over TLS I get these errors:
SQLSTATE[HY000] [1045] Access denied for user 'icingaweb2'@'myhost' (using password: YES)
#0 /usr/share/icingaweb2/modules/setup/library/Setup/Utils/DbTool.php(353): PDO->__construct()
#1 /usr/share/icingaweb2/modules/setup/library/Setup/Utils/DbTool.php(231): Icinga\Module\Setup\Utils\DbTool->pdoConnect()
#2 /usr/share/icingaweb2/modules/setup/library/Setup/Utils/DbTool.php(166): Icinga\Module\Setup\Utils\DbTool->connect()
#3 /usr/share/php/Icinga/Application/MigrationManager.php(336): Icinga\Module\Setup\Utils\DbTool->connectToDb()
#4 /usr/share/php/Icinga/Application/MigrationManager.php(228): Icinga\Application\MigrationManager->checkRequiredPrivileges()
#5 /usr/share/icingaweb2/application/controllers/MigrationsController.php(58): Icinga\Application\MigrationManager->validateDatabasePrivileges()
#6 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action.php(516): Icinga\Controllers\MigrationsController->indexAction()
#7 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch()
#8 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Front.php(954): Icinga\Web\Controller\Dispatcher->dispatch()
#9 /usr/share/php/Icinga/Application/Web.php(294): Zend_Controller_Front->dispatch()
#10 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch()
#11 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#12 {main}
In MariaDB log I see ‘Access Denied’.
The test connect to the db does work correctly (Settings->Configuration->Application->Ressources).
On an other host with a local MariaDB without TLS the schema migration has worked without problems after update to 2.12.
The grants are on both hosts the same:
with MariaDB on other Host and TLS:
±------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for icingaweb2@myhost |
±------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON . TO icingaweb2
@myhost
IDENTIFIED BY PASSWORD '********************’ REQUIRE SSL |
| GRANT ALL PRIVILEGES ON icingaweb2
. TO icingaweb2
@myhost
|
±------------------------------------------------------------------------------------------------------------------------------------------------+
With MariaDB on localhost and without TLS
±------------------------------------------------------------------------------------------------------------------+
| Grants for icingaweb2@localhost |
±------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON . TO icingaweb2
@localhost
IDENTIFIED BY PASSWORD '********************’ |
| GRANT ALL PRIVILEGES ON icingaweb2
. TO icingaweb2
@localhost
|
±------------------------------------------------------------------------------------------------------------------+
What can be the problem?
- Icinga Web 2 version: 2.12.0
- Used modules and their versions (System - About)
- director 1.10.2
- doc 2.12.0
- fileshipper 1.2.0
- incubator 0.20.0
- monitoring 2.12.0
- Web browser used - Edge and Firefox
- Icinga 2 version used (
icinga2 --version
): r2.14.0-1 - PHP version used (
php --version
): 8.0.27 - Server operating system and version: Red Hat Enterprise Linux Release 8.8