On a dockerized CI environment (Ubuntu 20.04) we are getting the following error:
cd dev/tests/integration; ../../../vendor/bin/phpunit -v --testsuite 'Our Tests'
...
Disabling Maintenance Mode:
In ResourceConnection.php line 148:
[DomainException]
Connection "default" is not defined
This seems during the automated sandbox installation.
When we run the command again, it works.
But after we deleted the sandboxes using
rm dev/tests/integration/tmp/sandbox-* -r
it does not work again on the first try.
We found https://github.com/magento/magento2/issues/22198 which says this could be related to the opcache.enable_cli
option, but this one is already switched to Off
.
Does anybody know how to fix this?
It did not happen for Magento 2.4.2 and surfaced after the upgrade to Magento 2.4.3.
EDIT: Exception trace:
Exception trace:
at /var/www/vendor/magento/framework/App/ResourceConnection.php:148
Magento\Framework\App\ResourceConnection->getConnectionByName() at /var/www/vendor/magento/framework/App/ResourceConnection.php:97
Magento\Framework\App\ResourceConnection->getConnection() at /var/www/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php:333
Magento\Framework\Model\ResourceModel\Db\AbstractDb->getConnection() at /var/www/vendor/magento/module-message-queue/Model/ResourceModel/Lock.php:103
Magento\MessageQueue\Model\ResourceModel\Lock->releaseOutdatedLocks() at /var/www/vendor/magento/module-message-queue/Model/Plugin/ResourceModel/Lock.php:39
Magento\MessageQueue\Model\Plugin\ResourceModel\Lock->afterSet() at /var/www/vendor/magento/framework/Interception/Interceptor.php:146
Magento\Framework\App\MaintenanceMode\Interceptor->Magento\Framework\Interception\{closure}() at /var/www/vendor/magento/framework/Interception/Interceptor.php:153
Magento\Framework\App\MaintenanceMode\Interceptor->___callPlugins() at /var/www/generated/code/Magento/Framework/App/MaintenanceMode/Interceptor.php:23
Magento\Framework\App\MaintenanceMode\Interceptor->set() at /var/www/setup/src/Magento/Setup/Model/Installer.php:1442
Magento\Setup\Model\Installer->setMaintenanceMode() at n/a:n/a
call_user_func_array() at /var/www/setup/src/Magento/Setup/Model/Installer.php:389
Magento\Setup\Model\Installer->install() at /var/www/setup/src/Magento/Setup/Console/Command/InstallCommand.php:231
Magento\Setup\Console\Command\InstallCommand->execute() at /var/www/vendor/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /var/www/vendor/symfony/console/Application.php:1009
Symfony\Component\Console\Application->doRunCommand() at /var/www/vendor/symfony/console/Application.php:273
Symfony\Component\Console\Application->doRun() at /var/www/vendor/magento/framework/Console/Cli.php:115
Magento\Framework\Console\Cli->doRun() at /var/www/vendor/symfony/console/Application.php:149
Symfony\Component\Console\Application->run() at /var/www/bin/magento:23