So I have an automation that deploys a MariaDB database v. 11.4 to a docker container using bitnami image. In addition, I inject the following config file:
[server]
connect_timeout=10
innodb_buffer_pool_size=2415919104
innodb_file_per_table=ON
innodb_flush_method=O_DIRECT
innodb_lock_wait_timeout=50
innodb_log_buffer_size=16777216
innodb_log_file_size=128M
innodb_strict_mode=ON
key_buffer_size=48M
max_allowed_packet=16M
max_connections=150
skip_name_resolve=ON
table_open_cache=2600
require_secure_transport=ON
ssl_cert=/opt/bitnami/mariadb/ssl/certificate.pem
ssl_key=/opt/bitnami/mariadb/ssl/key.pem
ssl_ca=/opt/bitnami/mariadb/ssl/intermediate.pem
ssl_cipher=ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
tls_version=TLSv1.2,TLSv1.3
expire_logs_days=1
max_binlog_size=1073741824
log_bin_trust_function_creators=OFF
local_infile=OFF
lock_wait_timeout=86400
max_connect_errors=100
open_files_limit=0
sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
bind-address=0.0.0.0
[client-mariadb]
ssl
But the container crashes after a few hundreds of attempts to connect:
user# docker logs my-container
mariadb 17:56:41.40 INFO ==>
mariadb 17:56:41.41 INFO ==> Welcome to the Bitnami mariadb container
mariadb 17:56:41.41 INFO ==> Subscribe to project updates by watching https://github.com/bitnami/containers
mariadb 17:56:41.41 INFO ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
mariadb 17:56:41.41 INFO ==> Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit https://bitnami.com/enterprise
mariadb 17:56:41.41 INFO ==>
mariadb 17:56:41.42 INFO ==> ** Starting MariaDB setup **
mariadb 17:56:41.43 INFO ==> Validating settings in MYSQL_*/MARIADB_* env vars
mariadb 17:56:41.44 INFO ==> Initializing mariadb database
mariadb 17:56:41.45 INFO ==> Updating 'my.cnf' with custom configuration
mariadb 17:56:41.45 INFO ==> Setting slow_query_log option
mariadb 17:56:41.46 INFO ==> Setting long_query_time option
mariadb 17:56:41.46 INFO ==> Injecting custom configuration 'my_custom.cnf'
mariadb 17:56:41.46 INFO ==> Installing database
/opt/bitnami/mariadb/bin/mysql: Deprecated program name. It will be removed in a future release, use '/opt/bitnami/mariadb/bin/mariadb' instead
mariadb 17:56:43.51 INFO ==> Starting mariadb in background
2024-08-12 17:56:43 0 [Note] Starting MariaDB 11.4.2-MariaDB-log source revision 3fca5ed772fb75e3e57c507edef2985f8eba5b12 as process 111
2024-08-12 17:56:43 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
2024-08-12 17:56:43 0 [Note] InnoDB: Number of transaction pools: 1
2024-08-12 17:56:43 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-08-12 17:56:43 0 [Note] mysqld: O_TMPFILE is not supported on /opt/bitnami/mariadb/tmp (disabling future attempts)
2024-08-12 17:56:43 0 [Note] InnoDB: Using Linux native AIO
2024-08-12 17:56:43 0 [Note] InnoDB: Initializing buffer pool, total size = 2.250GiB, chunk size = 36.000MiB
2024-08-12 17:56:43 0 [Note] InnoDB: Completed initialization of buffer pool
2024-08-12 17:56:43 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
2024-08-12 17:56:43 0 [Note] InnoDB: End of log at LSN=47763
2024-08-12 17:56:43 0 [Note] InnoDB: Opened 3 undo tablespaces
2024-08-12 17:56:43 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
2024-08-12 17:56:43 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-08-12 17:56:43 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2024-08-12 17:56:43 0 [Note] InnoDB: log sequence number 47763; transaction id 14
2024-08-12 17:56:43 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-08-12 17:56:43 0 [Note] Plugin 'wsrep-provider' is disabled.
2024-08-12 17:56:43 0 [Note] InnoDB: Loading buffer pool(s) from /bitnami/mariadb/data/ib_buffer_pool
2024-08-12 17:56:43 0 [Note] InnoDB: Buffer pool(s) load completed at 240812 17:56:43
2024-08-12 17:56:43 0 [Note] Server socket created on IP: '127.0.0.1'.
2024-08-12 17:56:43 0 [Warning] 'user' entry 'root@67ff831aa227' ignored in --skip-name-resolve mode.
2024-08-12 17:56:43 0 [Warning] 'proxies_priv' entry '@% root@67ff831aa227' ignored in --skip-name-resolve mode.
2024-08-12 17:56:43 0 [Note] mysqld: Event Scheduler: Loaded 0 events
2024-08-12 17:56:43 0 [Note] /opt/bitnami/mariadb/sbin/mysqld: ready for connections.
Version: '11.4.2-MariaDB-log' socket: '/opt/bitnami/mariadb/tmp/mysql.sock' port: 3306 Source distribution
2024-08-12 17:56:45 4 [Warning] Aborted connection 4 to db: 'unconnected' user: 'unauthenticated' host: 'localhost' (This connection closed normally without authentication)
2024-08-12 17:56:47 5 [Warning] Aborted connection 5 to db: 'unconnected' user: 'unauthenticated' host: 'localhost' (This connection closed normally without authentication)
2024-08-12 17:56:49 6 [Warning] Aborted connection 6 to db: 'unconnected' user: 'unauthenticated' host: 'localhost' (This connection closed normally without authentication)
2024-08-12 17:56:51 7 [Warning] Aborted connection 7 to db: 'unconnected' user: 'unauthenticated' host: 'localhost' (This connection closed normally without authentication)
2024-08-12 17:56:53 8 [Warning] Aborted connection 8 to db: 'unconnected' user: 'unauthenticated' host: 'localhost' (This connection closed normally without authentication)
2024-08-12 17:56:55 9 [Warning] Aborted connection 9 to db: 'unconnected' user: 'unauthenticated' host: 'localhost' (This connection closed normally without authentication)
....
....
mariadb 18:06:56.90 ERROR ==> Timed out waiting for MySQL to be accessible
mariadb 18:06:56.90 INFO ==> Stopping mariadb
2024-08-12 18:06:56 0 [Note] /opt/bitnami/mariadb/sbin/mysqld (initiated by: unknown): Normal shutdown
2024-08-12 18:06:56 0 [Note] InnoDB: FTS optimize thread exiting.
2024-08-12 18:06:56 0 [Note] InnoDB: Starting shutdown...
2024-08-12 18:06:56 0 [Note] InnoDB: Dumping buffer pool(s) to /bitnami/mariadb/data/ib_buffer_pool
2024-08-12 18:06:56 0 [Note] InnoDB: Buffer pool(s) dump completed at 240812 18:06:56
2024-08-12 18:06:57 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
2024-08-12 18:06:57 0 [Note] InnoDB: Shutdown completed; log sequence number 47763; transaction id 15
2024-08-12 18:06:57 0 [Note] /opt/bitnami/mariadb/sbin/mysqld: Shutdown complete
After some digging, it appears that the SSL configuration is what breaks the container, and when leaving ssl_cert, ssl_key, ssl_ca, ssl_cipher, tls_version
parameters out of the config file, the deployment succeeds. I know that SSL is now enabled by default, but I failed to find any hint on the release notes indicating that no self signed certs can be configured, or any newer way of configuring them.
Note that the deployment works flawlessly with the exact same config file if I use the mariadb:10.11 image of bitnami.
Could anyone enlighten me on what have changed regarding SSL in 11.4?
I also tried the 11.4.2 image, which I now see that is pretty much the same… goal is, of course, a healthy docker container running mariadb 11.4 server with self signed SSL.