mariadb image not exiting smothly with docker rootless
it seems the mariadb:10.3 image is not compatible with docker rootless mode:
my stripped down docker compose file:
services: test-db: image: mariadb:10.3 restart: always environment: MARIADB_ROOT_PASSWORD: "ping" command: --sql-mode="ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" test-phpmyadmin: image: phpmyadmin restart: always ports: - 8180:8180 environment: PMA_HOST: test-db APACHE_PORT: 8180 UPLOAD_LIMIT: 300M PMA_ABSOLUTE_URI: "https://pma.${hostname}" hostname: "pma.${hostname}"
db-test$ docker compose up WARN[0000] The "hostname" variable is not set. Defaulting to a blank string. WARN[0000] The "hostname" variable is not set. Defaulting to a blank string. [+] Running 3/3 ✔ Network db-test_default Created 0.1s ✔ Container db-test-test-phpmyadmin-1 Created 0.1s ✔ Container db-test-test-db-1 Created 0.1s Attaching to test-db-1, test-phpmyadmin-1 test-phpmyadmin-1 | Setting apache port to 8180. test-db-1 | 2024-06-24 23:24:30+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.3.39+maria~ubu2004 started. test-phpmyadmin-1 | Syntax OK test-phpmyadmin-1 | [Mon Jun 24 23:24:31.041079 2024] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.59 (Debian) PHP/8.2.20 configured -- resuming normal operations test-phpmyadmin-1 | [Mon Jun 24 23:24:31.041130 2024] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND' test-db-1 | 2024-06-24 23:24:31+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' test-db-1 | 2024-06-24 23:24:31+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.3.39+maria~ubu2004 started. test-db-1 | 2024-06-24 23:24:31+00:00 [Note] [Entrypoint]: Initializing database files test-db-1 | test-db-1 | test-db-1 | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER ! test-db-1 | To do so, start the server, then issue the following command: test-db-1 | test-db-1 | '/usr/bin/mysql_secure_installation' test-db-1 | test-db-1 | which will also give you the option of removing the test test-db-1 | databases and anonymous user created by default. This is test-db-1 | strongly recommended for production servers. test-db-1 | test-db-1 | See the MariaDB Knowledgebase at http://mariadb.com/kb test-db-1 | test-db-1 | Please report any problems at http://mariadb.org/jira test-db-1 | test-db-1 | The latest information about MariaDB is available at http://mariadb.org/. test-db-1 | test-db-1 | Consider joining MariaDB's strong and vibrant community: test-db-1 | https://mariadb.org/get-involved/ test-db-1 | test-db-1 | 2024-06-24 23:24:33+00:00 [Note] [Entrypoint]: Database files initialized test-db-1 | 2024-06-24 23:24:33+00:00 [Note] [Entrypoint]: Starting temporary server test-db-1 | 2024-06-24 23:24:33+00:00 [Note] [Entrypoint]: Waiting for server startup test-db-1 | 2024-06-24 23:24:33 0 [Note] Starting MariaDB 10.3.39-MariaDB-1:10.3.39+maria~ubu2004 source revision ca001cf2048f0152689e1895e2dc15486dd0b1af as process 109 test-db-1 | 2024-06-24 23:24:33 0 [Note] InnoDB: Using Linux native AIO test-db-1 | 2024-06-24 23:24:33 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins test-db-1 | 2024-06-24 23:24:33 0 [Note] InnoDB: Uses event mutexes test-db-1 | 2024-06-24 23:24:33 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 test-db-1 | 2024-06-24 23:24:33 0 [Note] InnoDB: Number of pools: 1 test-db-1 | 2024-06-24 23:24:33 0 [Note] InnoDB: Using SSE2 crc32 instructions test-db-1 | 2024-06-24 23:24:33 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M test-db-1 | 2024-06-24 23:24:33 0 [Note] InnoDB: Completed initialization of buffer pool test-db-1 | 2024-06-24 23:24:33 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). test-db-1 | 2024-06-24 23:24:33 0 [Note] InnoDB: 128 out of 128 rollback segments are active. test-db-1 | 2024-06-24 23:24:33 0 [Note] InnoDB: Creating shared tablespace for temporary tables test-db-1 | 2024-06-24 23:24:33 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... test-db-1 | 2024-06-24 23:24:33 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. test-db-1 | 2024-06-24 23:24:33 0 [Note] InnoDB: 10.3.39 started; log sequence number 1625419; transaction id 20 test-db-1 | 2024-06-24 23:24:33 0 [Note] Plugin 'FEEDBACK' is disabled. test-db-1 | 2024-06-24 23:24:33 0 [Warning] 'user' entry 'root@a25e34f9f94c' ignored in --skip-name-resolve mode. test-db-1 | 2024-06-24 23:24:33 0 [Warning] 'proxies_priv' entry '@% root@a25e34f9f94c' ignored in --skip-name-resolve mode. test-db-1 | 2024-06-24 23:24:33 0 [Note] Reading of all Master_info entries succeeded test-db-1 | 2024-06-24 23:24:33 0 [Note] Added new Master_info '' to hash table test-db-1 | 2024-06-24 23:24:33 0 [Note] mysqld: ready for connections. test-db-1 | Version: '10.3.39-MariaDB-1:10.3.39+maria~ubu2004' socket: '/var/run/mysqld/mysqld.sock' port: 0 mariadb.org binary distribution test-db-1 | 2024-06-24 23:24:34+00:00 [Note] [Entrypoint]: Temporary server started. test-db-1 | 2024-06-24 23:24:35+00:00 [Note] [Entrypoint]: Securing system users (equivalent to running mysql_secure_installation) test-db-1 | test-db-1 | /usr/local/bin/docker-entrypoint.sh: line 149: kill: (109) - Permission denied test-db-1 | 2024-06-24 23:24:35+00:00 [Note] [Entrypoint]: Stopping temporary server test-db-1 exited with code 1 test-db-1 | 2024-06-24 23:24:35+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' test-db-1 | 2024-06-24 23:24:35+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.3.39+maria~ubu2004 started. test-db-1 | 2024-06-24 23:24:35+00:00 [Note] [Entrypoint]: MariaDB upgrade not required test-db-1 | 2024-06-24 23:24:35 0 [Note] Starting MariaDB 10.3.39-MariaDB-1:10.3.39+maria~ubu2004 source revision ca001cf2048f0152689e1895e2dc15486dd0b1af as process 1 test-db-1 | 2024-06-24 23:24:35 0 [Note] InnoDB: Using Linux native AIO test-db-1 | 2024-06-24 23:24:35 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins test-db-1 | 2024-06-24 23:24:35 0 [Note] InnoDB: Uses event mutexes test-db-1 | 2024-06-24 23:24:35 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 test-db-1 | 2024-06-24 23:24:35 0 [Note] InnoDB: Number of pools: 1 test-db-1 | 2024-06-24 23:24:35 0 [Note] InnoDB: Using SSE2 crc32 instructions test-db-1 | 2024-06-24 23:24:35 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M test-db-1 | 2024-06-24 23:24:35 0 [Note] InnoDB: Completed initialization of buffer pool test-db-1 | 2024-06-24 23:24:35 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). test-db-1 | 2024-06-24 23:24:35 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1625419 test-db-1 | 2024-06-24 23:24:36 0 [Note] InnoDB: 128 out of 128 rollback segments are active. test-db-1 | 2024-06-24 23:24:36 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" test-db-1 | 2024-06-24 23:24:36 0 [Note] InnoDB: Creating shared tablespace for temporary tables test-db-1 | 2024-06-24 23:24:36 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... test-db-1 | 2024-06-24 23:24:36 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. test-db-1 | 2024-06-24 23:24:36 0 [Note] InnoDB: 10.3.39 started; log sequence number 1625428; transaction id 20 test-db-1 | 2024-06-24 23:24:36 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool test-db-1 | 2024-06-24 23:24:36 0 [Note] InnoDB: Cannot open '/var/lib/mysql/ib_buffer_pool' for reading: No such file or directory test-db-1 | 2024-06-24 23:24:36 0 [Note] Plugin 'FEEDBACK' is disabled. test-db-1 | 2024-06-24 23:24:36 0 [Note] Recovering after a crash using tc.log test-db-1 | 2024-06-24 23:24:36 0 [Note] Starting crash recovery... test-db-1 | 2024-06-24 23:24:36 0 [Note] Crash recovery finished. test-db-1 | 2024-06-24 23:24:36 0 [Note] Server socket created on IP: '::'. test-db-1 | 2024-06-24 23:24:36 0 [ERROR] mysqld: Table './mysql/user' is marked as crashed and should be repaired test-db-1 | 2024-06-24 23:24:36 0 [Warning] Checking table: './mysql/user' test-db-1 | 2024-06-24 23:24:36 0 [ERROR] mysql.user: 1 client is using or hasn't closed the table properly test-db-1 | 2024-06-24 23:24:36 0 [ERROR] mysqld: Table './mysql/proxies_priv' is marked as crashed and should be repaired test-db-1 | 2024-06-24 23:24:36 0 [Warning] Checking table: './mysql/proxies_priv' test-db-1 | 2024-06-24 23:24:36 0 [ERROR] mysql.proxies_priv: 1 client is using or hasn't closed the table properly test-db-1 | 2024-06-24 23:24:36 0 [ERROR] mysqld: Table './mysql/time_zone_name' is marked as crashed and should be repaired test-db-1 | 2024-06-24 23:24:36 0 [Warning] Checking table: './mysql/time_zone_name' test-db-1 | 2024-06-24 23:24:36 0 [ERROR] mysql.time_zone_name: 1 client is using or hasn't closed the table properly test-db-1 | 2024-06-24 23:24:36 0 [ERROR] mysqld: Table './mysql/time_zone' is marked as crashed and should be repaired test-db-1 | 2024-06-24 23:24:36 0 [Warning] Checking table: './mysql/time_zone' test-db-1 | 2024-06-24 23:24:36 0 [ERROR] mysql.time_zone: 1 client is using or hasn't closed the table properly test-db-1 | 2024-06-24 23:24:36 0 [Note] Reading of all Master_info entries succeeded test-db-1 | 2024-06-24 23:24:36 0 [Note] Added new Master_info '' to hash table test-db-1 | 2024-06-24 23:24:36 0 [Note] mysqld: ready for connections. test-db-1 | Version: '10.3.39-MariaDB-1:10.3.39+maria~ubu2004' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution ^CGracefully stopping... (press Ctrl+C again to force) [+] Stopping 2/2 ✔ Container db-test-test-phpmyadmin-1 Stopped 1.2s ✘ Container db-test-test-db-1 Error while Stopping canceled
i can only stop this with restarting the docker daemon:
$ systemctl --user restart docker
when i try the same with docker in root mode i get:
db-test$ docker compose up WARN[0000] The "hostname" variable is not set. Defaulting to a blank string. WARN[0000] The "hostname" variable is not set. Defaulting to a blank string. [+] Running 3/3 ✔ Network db-test_default Created 0.1s ✔ Container db-test-test-phpmyadmin-1 Created 0.1s ✔ Container db-test-test-db-1 Created 0.1s Attaching to test-db-1, test-phpmyadmin-1 test-db-1 | 2024-06-24 23:36:54+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.3.39+maria~ubu2004 started. test-phpmyadmin-1 | Setting apache port to 8180. test-phpmyadmin-1 | Syntax OK test-db-1 | 2024-06-24 23:36:54+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' test-db-1 | 2024-06-24 23:36:54+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.3.39+maria~ubu2004 started. test-phpmyadmin-1 | [Mon Jun 24 23:36:54.726401 2024] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.59 (Debian) PHP/8.2.18 configured -- resuming normal operations test-phpmyadmin-1 | [Mon Jun 24 23:36:54.726448 2024] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND' test-db-1 | 2024-06-24 23:36:54+00:00 [Note] [Entrypoint]: Initializing database files test-db-1 | test-db-1 | test-db-1 | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER ! test-db-1 | To do so, start the server, then issue the following command: test-db-1 | test-db-1 | '/usr/bin/mysql_secure_installation' test-db-1 | test-db-1 | which will also give you the option of removing the test test-db-1 | databases and anonymous user created by default. This is test-db-1 | strongly recommended for production servers. test-db-1 | test-db-1 | See the MariaDB Knowledgebase at http://mariadb.com/kb test-db-1 | test-db-1 | Please report any problems at http://mariadb.org/jira test-db-1 | test-db-1 | The latest information about MariaDB is available at http://mariadb.org/. test-db-1 | test-db-1 | Consider joining MariaDB's strong and vibrant community: test-db-1 | https://mariadb.org/get-involved/ test-db-1 | test-db-1 | 2024-06-24 23:36:56+00:00 [Note] [Entrypoint]: Database files initialized test-db-1 | 2024-06-24 23:36:56+00:00 [Note] [Entrypoint]: Starting temporary server test-db-1 | 2024-06-24 23:36:56+00:00 [Note] [Entrypoint]: Waiting for server startup test-db-1 | 2024-06-24 23:36:57 0 [Note] Starting MariaDB 10.3.39-MariaDB-1:10.3.39+maria~ubu2004 source revision ca001cf2048f0152689e1895e2dc15486dd0b1af as process 109 test-db-1 | 2024-06-24 23:36:57 0 [Note] InnoDB: Using Linux native AIO test-db-1 | 2024-06-24 23:36:57 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins test-db-1 | 2024-06-24 23:36:57 0 [Note] InnoDB: Uses event mutexes test-db-1 | 2024-06-24 23:36:57 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 test-db-1 | 2024-06-24 23:36:57 0 [Note] InnoDB: Number of pools: 1 test-db-1 | 2024-06-24 23:36:57 0 [Note] InnoDB: Using SSE2 crc32 instructions test-db-1 | 2024-06-24 23:36:57 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M test-db-1 | 2024-06-24 23:36:57 0 [Note] InnoDB: Completed initialization of buffer pool test-db-1 | 2024-06-24 23:36:57 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). test-db-1 | 2024-06-24 23:36:57 0 [Note] InnoDB: 128 out of 128 rollback segments are active. test-db-1 | 2024-06-24 23:36:57 0 [Note] InnoDB: Creating shared tablespace for temporary tables test-db-1 | 2024-06-24 23:36:57 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... test-db-1 | 2024-06-24 23:36:57 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. test-db-1 | 2024-06-24 23:36:57 0 [Note] InnoDB: 10.3.39 started; log sequence number 1625419; transaction id 20 test-db-1 | 2024-06-24 23:36:57 0 [Note] Plugin 'FEEDBACK' is disabled. test-db-1 | 2024-06-24 23:36:57 0 [Warning] 'user' entry 'root@b86b2e5732bf' ignored in --skip-name-resolve mode. test-db-1 | 2024-06-24 23:36:57 0 [Warning] 'proxies_priv' entry '@% root@b86b2e5732bf' ignored in --skip-name-resolve mode. test-db-1 | 2024-06-24 23:36:57 0 [Note] Reading of all Master_info entries succeeded test-db-1 | 2024-06-24 23:36:57 0 [Note] Added new Master_info '' to hash table test-db-1 | 2024-06-24 23:36:57 0 [Note] mysqld: ready for connections. test-db-1 | Version: '10.3.39-MariaDB-1:10.3.39+maria~ubu2004' socket: '/var/run/mysqld/mysqld.sock' port: 0 mariadb.org binary distribution test-db-1 | 2024-06-24 23:36:58+00:00 [Note] [Entrypoint]: Temporary server started. test-db-1 | 2024-06-24 23:36:58+00:00 [Note] [Entrypoint]: Securing system users (equivalent to running mysql_secure_installation) test-db-1 | test-db-1 | 2024-06-24 23:36:58+00:00 [Note] [Entrypoint]: Stopping temporary server test-db-1 | 2024-06-24 23:36:58 0 [Note] mysqld (initiated by: unknown): Normal shutdown test-db-1 | 2024-06-24 23:36:58 0 [Note] Event Scheduler: Purging the queue. 0 events test-db-1 | 2024-06-24 23:36:58 0 [Note] InnoDB: FTS optimize thread exiting. test-db-1 | 2024-06-24 23:36:58 0 [Note] InnoDB: Starting shutdown... test-db-1 | 2024-06-24 23:36:58 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool test-db-1 | 2024-06-24 23:36:58 0 [Note] InnoDB: Buffer pool(s) dump completed at 240624 23:36:58 test-db-1 | 2024-06-24 23:36:59 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" test-db-1 | 2024-06-24 23:36:59 0 [Note] InnoDB: Shutdown completed; log sequence number 1625428; transaction id 21 test-db-1 | 2024-06-24 23:37:00 0 [Note] mysqld: Shutdown complete test-db-1 | test-db-1 | 2024-06-24 23:37:00+00:00 [Note] [Entrypoint]: Temporary server stopped test-db-1 | test-db-1 | 2024-06-24 23:37:00+00:00 [Note] [Entrypoint]: MariaDB init process done. Ready for start up. test-db-1 | test-db-1 | 2024-06-24 23:37:00 0 [Note] Starting MariaDB 10.3.39-MariaDB-1:10.3.39+maria~ubu2004 source revision ca001cf2048f0152689e1895e2dc15486dd0b1af as process 1 test-db-1 | 2024-06-24 23:37:00 0 [Note] InnoDB: Using Linux native AIO test-db-1 | 2024-06-24 23:37:00 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins test-db-1 | 2024-06-24 23:37:00 0 [Note] InnoDB: Uses event mutexes test-db-1 | 2024-06-24 23:37:00 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 test-db-1 | 2024-06-24 23:37:00 0 [Note] InnoDB: Number of pools: 1 test-db-1 | 2024-06-24 23:37:00 0 [Note] InnoDB: Using SSE2 crc32 instructions test-db-1 | 2024-06-24 23:37:00 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M test-db-1 | 2024-06-24 23:37:00 0 [Note] InnoDB: Completed initialization of buffer pool test-db-1 | 2024-06-24 23:37:00 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). test-db-1 | 2024-06-24 23:37:00 0 [Note] InnoDB: 128 out of 128 rollback segments are active. test-db-1 | 2024-06-24 23:37:00 0 [Note] InnoDB: Creating shared tablespace for temporary tables test-db-1 | 2024-06-24 23:37:00 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... test-db-1 | 2024-06-24 23:37:00 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. test-db-1 | 2024-06-24 23:37:00 0 [Note] InnoDB: 10.3.39 started; log sequence number 1625428; transaction id 20 test-db-1 | 2024-06-24 23:37:00 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool test-db-1 | 2024-06-24 23:37:00 0 [Note] Plugin 'FEEDBACK' is disabled. test-db-1 | 2024-06-24 23:37:00 0 [Note] InnoDB: Buffer pool(s) load completed at 240624 23:37:00 test-db-1 | 2024-06-24 23:37:00 0 [Note] Server socket created on IP: '::'. test-db-1 | 2024-06-24 23:37:00 0 [Note] Reading of all Master_info entries succeeded test-db-1 | 2024-06-24 23:37:00 0 [Note] Added new Master_info '' to hash table test-db-1 | 2024-06-24 23:37:00 0 [Note] mysqld: ready for connections. test-db-1 | Version: '10.3.39-MariaDB-1:10.3.39+maria~ubu2004' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution ^CGracefully stopping... (press Ctrl+C again to force) [+] Stopping 2/2 ✔ Container db-test-test-phpmyadmin-1 Stopped 1.2s ✔ Container db-test-test-db-1 Stopped 1.4s canceled
both tests are on a *blank-canvas* (i checked that there are no old volumes hanging around..)
in the root mode i definitely see some other startup behavior!
is this a known bug / incompatibility with my old image version??! (i use this old version for maximum compatibility with the old server setup i try to replicate...)
i am thankful for any kind of hints!!
sunny greetings stefan
Answer Answered by Stefan Krüger in this comment.
ok - it seems to be the old image.. with the current lts (mariadb:11.4) it seems working fine.
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.