DOMjudge / domjudge-packaging

DOMjudge packaging for (Linux) distributions and live image
33 stars 40 forks source link

mariadb:latest - PDOException (2054) - SQLSTATE[HY000] [2054] Server sent charset (0) unknown to the client. #177

Closed spitzlei closed 3 months ago

spitzlei commented 9 months ago

When using the default docker-compose.yml with pointing to mariadb:latest DOMJudge crashes since latest MariaDB Update (11.3.2).

Message:

[PDOException (2054)]                                                        
SQLSTATE[HY000] [2054] Server sent charset (0) unknown to the client. Please, report to the developers

Full trace:

domjudge-1     | Exception trace:
domjudge-1     |   at /opt/domjudge/domserver/lib/vendor/doctrine/doctrine-bundle/ConnectionFactory.php:132
domjudge-1     |  Doctrine\Bundle\DoctrineBundle\ConnectionFactory->getDatabasePlatform() at /opt/domjudge/domserver/lib/vendor/doctrine/doctrine-bundle/ConnectionFactory.php:109
domjudge-1     |  Doctrine\Bundle\DoctrineBundle\ConnectionFactory->createConnection() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/App_KernelProdContainer.php:495
domjudge-1     |  ContainerFy6Mj2Y\App_KernelProdContainer->getDoctrine_Dbal_DefaultConnectionService() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/App_KernelProdContainer.php:548
domjudge-1     |  ContainerFy6Mj2Y\App_KernelProdContainer->getDoctrine_Orm_DefaultEntityManagerService() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/App_KernelProdContainer.php:908
domjudge-1     |  ContainerFy6Mj2Y\App_KernelProdContainer->getDOMJudgeServiceService() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/getCallApiActionCommandService.php:23
domjudge-1     |  ContainerFy6Mj2Y\getCallApiActionCommandService::do() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/App_KernelProdContainer.php:431
domjudge-1     |  ContainerFy6Mj2Y\App_KernelProdContainer->load() at /opt/domjudge/domserver/lib/vendor/symfony/dependency-injection/Container.php:237
domjudge-1     |  Symfony\Component\DependencyInjection\Container->make() at /opt/domjudge/domserver/lib/vendor/symfony/dependency-injection/Container.php:219
domjudge-1     |  Symfony\Component\DependencyInjection\Container->get() at /opt/domjudge/domserver/lib/vendor/symfony/framework-bundle/Console/Application.php:191
domjudge-1     |  Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() at /opt/domjudge/domserver/lib/vendor/symfony/framework-bundle/Console/Application.php:74
domjudge-1     |  Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /opt/domjudge/domserver/lib/vendor/symfony/console/Application.php:171
domjudge-1     |  Symfony\Component\Console\Application->run() at /opt/domjudge/domserver/webapp/bin/console:42
domjudge-1     | 
domjudge-1     | In ExceptionConverter.php line 101:
domjudge-1     |                                                                                
domjudge-1     |   [Doctrine\DBAL\Exception\ConnectionException (2054)]                         
domjudge-1     |   An exception occurred in the driver: SQLSTATE[HY000] [2054] Server sent cha  
domjudge-1     |   rset (0) unknown to the client. Please, report to the developers             
domjudge-1     |                                                                                
domjudge-1     | 
domjudge-1     | Exception trace:
domjudge-1     |   at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:101
domjudge-1     |  Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert() at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Connection.php:1907
domjudge-1     |  Doctrine\DBAL\Connection->handleDriverException() at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Connection.php:1856
domjudge-1     |  Doctrine\DBAL\Connection->convertException() at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Connection.php:347
domjudge-1     |  Doctrine\DBAL\Connection->connect() at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Connection.php:416
domjudge-1     |  Doctrine\DBAL\Connection->getDatabasePlatformVersion() at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Connection.php:378
domjudge-1     |  Doctrine\DBAL\Connection->detectDatabasePlatform() at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Connection.php:288
domjudge-1     |  Doctrine\DBAL\Connection->getDatabasePlatform() at /opt/domjudge/domserver/lib/vendor/doctrine/doctrine-bundle/ConnectionFactory.php:130
domjudge-1     |  Doctrine\Bundle\DoctrineBundle\ConnectionFactory->getDatabasePlatform() at /opt/domjudge/domserver/lib/vendor/doctrine/doctrine-bundle/ConnectionFactory.php:109
domjudge-1     |  Doctrine\Bundle\DoctrineBundle\ConnectionFactory->createConnection() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/App_KernelProdContainer.php:495
domjudge-1     |  ContainerFy6Mj2Y\App_KernelProdContainer->getDoctrine_Dbal_DefaultConnectionService() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/App_KernelProdContainer.php:548
domjudge-1     |  ContainerFy6Mj2Y\App_KernelProdContainer->getDoctrine_Orm_DefaultEntityManagerService() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/App_KernelProdContainer.php:908
domjudge-1     |  ContainerFy6Mj2Y\App_KernelProdContainer->getDOMJudgeServiceService() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/getCallApiActionCommandService.php:23
domjudge-1     |  ContainerFy6Mj2Y\getCallApiActionCommandService::do() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/App_KernelProdContainer.php:431
domjudge-1     |  ContainerFy6Mj2Y\App_KernelProdContainer->load() at /opt/domjudge/domserver/lib/vendor/symfony/dependency-injection/Container.php:237
domjudge-1     |  Symfony\Component\DependencyInjection\Container->make() at /opt/domjudge/domserver/lib/vendor/symfony/dependency-injection/Container.php:219
domjudge-1     |  Symfony\Component\DependencyInjection\Container->get() at /opt/domjudge/domserver/lib/vendor/symfony/framework-bundle/Console/Application.php:191
domjudge-1     |  Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() at /opt/domjudge/domserver/lib/vendor/symfony/framework-bundle/Console/Application.php:74
domjudge-1     |  Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /opt/domjudge/domserver/lib/vendor/symfony/console/Application.php:171
domjudge-1     |  Symfony\Component\Console\Application->run() at /opt/domjudge/domserver/webapp/bin/console:42
domjudge-1     | 
domjudge-1     | In Exception.php line 28:
domjudge-1     |                                                                                
domjudge-1     |   [Doctrine\DBAL\Driver\PDO\Exception (2054)]                                  
domjudge-1     |   SQLSTATE[HY000] [2054] Server sent charset (0) unknown to the client. Pleas  
domjudge-1     |   e, report to the developers                                                  
domjudge-1     |                                                                                
domjudge-1     | 
domjudge-1     | Exception trace:
domjudge-1     |   at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:28
domjudge-1     |  Doctrine\DBAL\Driver\PDO\Exception::new() at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php:34
domjudge-1     |  Doctrine\DBAL\Driver\PDO\MySQL\Driver->connect() at /opt/domjudge/domserver/lib/vendor/sentry/sentry-symfony/src/Tracing/Doctrine/DBAL/TracingDriverForV3.php:55
domjudge-1     |  Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverForV3->connect() at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Connection.php:345
domjudge-1     |  Doctrine\DBAL\Connection->connect() at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Connection.php:416
domjudge-1     |  Doctrine\DBAL\Connection->getDatabasePlatformVersion() at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Connection.php:378
domjudge-1     |  Doctrine\DBAL\Connection->detectDatabasePlatform() at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Connection.php:288
domjudge-1     |  Doctrine\DBAL\Connection->getDatabasePlatform() at /opt/domjudge/domserver/lib/vendor/doctrine/doctrine-bundle/ConnectionFactory.php:130
domjudge-1     |  Doctrine\Bundle\DoctrineBundle\ConnectionFactory->getDatabasePlatform() at /opt/domjudge/domserver/lib/vendor/doctrine/doctrine-bundle/ConnectionFactory.php:109
domjudge-1     |  Doctrine\Bundle\DoctrineBundle\ConnectionFactory->createConnection() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/App_KernelProdContainer.php:495
domjudge-1     |  ContainerFy6Mj2Y\App_KernelProdContainer->getDoctrine_Dbal_DefaultConnectionService() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/App_KernelProdContainer.php:548
domjudge-1     |  ContainerFy6Mj2Y\App_KernelProdContainer->getDoctrine_Orm_DefaultEntityManagerService() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/App_KernelProdContainer.php:908
domjudge-1     |  ContainerFy6Mj2Y\App_KernelProdContainer->getDOMJudgeServiceService() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/getCallApiActionCommandService.php:23
domjudge-1     |  ContainerFy6Mj2Y\getCallApiActionCommandService::do() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/App_KernelProdContainer.php:431
domjudge-1     |  ContainerFy6Mj2Y\App_KernelProdContainer->load() at /opt/domjudge/domserver/lib/vendor/symfony/dependency-injection/Container.php:237
domjudge-1     |  Symfony\Component\DependencyInjection\Container->make() at /opt/domjudge/domserver/lib/vendor/symfony/dependency-injection/Container.php:219
domjudge-1     |  Symfony\Component\DependencyInjection\Container->get() at /opt/domjudge/domserver/lib/vendor/symfony/framework-bundle/Console/Application.php:191
domjudge-1     |  Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() at /opt/domjudge/domserver/lib/vendor/symfony/framework-bundle/Console/Application.php:74
domjudge-1     |  Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /opt/domjudge/domserver/lib/vendor/symfony/console/Application.php:171
domjudge-1     |  Symfony\Component\Console\Application->run() at /opt/domjudge/domserver/webapp/bin/console:42
domjudge-1     | 
domjudge-1     | In Driver.php line 27:
domjudge-1     |                                                                                
domjudge-1     |   [PDOException (2054)]                                                        
domjudge-1     |   SQLSTATE[HY000] [2054] Server sent charset (0) unknown to the client. Pleas  
domjudge-1     |   e, report to the developers                                                  
domjudge-1     |                                                                                
domjudge-1     | 
domjudge-1     | Exception trace:
domjudge-1     |   at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php:27
domjudge-1     |  PDO->__construct() at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php:27
domjudge-1     |  Doctrine\DBAL\Driver\PDO\MySQL\Driver->connect() at /opt/domjudge/domserver/lib/vendor/sentry/sentry-symfony/src/Tracing/Doctrine/DBAL/TracingDriverForV3.php:55
domjudge-1     |  Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverForV3->connect() at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Connection.php:345
domjudge-1     |  Doctrine\DBAL\Connection->connect() at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Connection.php:416
domjudge-1     |  Doctrine\DBAL\Connection->getDatabasePlatformVersion() at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Connection.php:378
domjudge-1     |  Doctrine\DBAL\Connection->detectDatabasePlatform() at /opt/domjudge/domserver/lib/vendor/doctrine/dbal/src/Connection.php:288
domjudge-1     |  Doctrine\DBAL\Connection->getDatabasePlatform() at /opt/domjudge/domserver/lib/vendor/doctrine/doctrine-bundle/ConnectionFactory.php:130
domjudge-1     |  Doctrine\Bundle\DoctrineBundle\ConnectionFactory->getDatabasePlatform() at /opt/domjudge/domserver/lib/vendor/doctrine/doctrine-bundle/ConnectionFactory.php:109
domjudge-1     |  Doctrine\Bundle\DoctrineBundle\ConnectionFactory->createConnection() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/App_KernelProdContainer.php:495
domjudge-1     |  ContainerFy6Mj2Y\App_KernelProdContainer->getDoctrine_Dbal_DefaultConnectionService() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/App_KernelProdContainer.php:548
domjudge-1     |  ContainerFy6Mj2Y\App_KernelProdContainer->getDoctrine_Orm_DefaultEntityManagerService() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/App_KernelProdContainer.php:908
domjudge-1     |  ContainerFy6Mj2Y\App_KernelProdContainer->getDOMJudgeServiceService() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/getCallApiActionCommandService.php:23
domjudge-1     |  ContainerFy6Mj2Y\getCallApiActionCommandService::do() at /opt/domjudge/domserver/webapp/var/cache/prod/ContainerFy6Mj2Y/App_KernelProdContainer.php:431
domjudge-1     |  ContainerFy6Mj2Y\App_KernelProdContainer->load() at /opt/domjudge/domserver/lib/vendor/symfony/dependency-injection/Container.php:237
domjudge-1     |  Symfony\Component\DependencyInjection\Container->make() at /opt/domjudge/domserver/lib/vendor/symfony/dependency-injection/Container.php:219
domjudge-1     |  Symfony\Component\DependencyInjection\Container->get() at /opt/domjudge/domserver/lib/vendor/symfony/framework-bundle/Console/Application.php:191
domjudge-1     |  Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() at /opt/domjudge/domserver/lib/vendor/symfony/framework-bundle/Console/Application.php:74
domjudge-1     |  Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /opt/domjudge/domserver/lib/vendor/symfony/console/Application.php:171
domjudge-1     |  Symfony\Component\Console\Application->run() at /opt/domjudge/domserver/webapp/bin/console:42

When using an older Version of MariaDB (mariadb:11.2) it works again.

spitzlei commented 9 months ago

Probably related to https://github.com/php/php-src/issues/13452

nickygerritsen commented 9 months ago

Thanks! I wonder if waiting for an upstream fix is the best thing to do for now? Or alternatively, shall we specify a specific MariaDB version in the proposed docker compose file?

spitzlei commented 9 months ago

From administrators sight: Keep the issue open, the Workaround can be found here. I had some other systems with different languages (python for example) with the same issue with the new MariaDB Image. So I think there will be a quick fix. Someone just has to track it and do the repackaging when the fix is out.

But I can't speak for other users :)

vmcj commented 3 months ago

@spitzlei I'll close this for now as we didn't receive new reports (so I suspect the MariaDB team fixed something).