Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fedora latest (37) and rawhide (38) cases fail with SSL error on MariaDB 10.5.18. #1289

Closed
junaruga opened this issue Dec 16, 2022 · 2 comments · Fixed by #1290
Closed

Fedora latest (37) and rawhide (38) cases fail with SSL error on MariaDB 10.5.18. #1289

junaruga opened this issue Dec 16, 2022 · 2 comments · Fixed by #1290

Comments

@junaruga
Copy link
Contributor

I executed GitHub Actions on the latest master branch ba4d465 on my forked repository, then I found that the mysqld (MariaDB 10.5.18) failed with the SSL error below on "fedora:latest" (Fedora 37) and "fedora:rawhide" (Fedora 38) containers on the GitHub Actions.

https://github.com/junaruga/mysql2/actions/runs/3715336707/jobs/6300377795#step:4:122

 + /usr/libexec/mysqld --user=root --log-error=/build/mysql.log --ssl
2022-12-16 17:49:55 0 [Note] /usr/libexec/mysqld (mysqld 10.5.18-MariaDB) starting as process 725 ...
+ cat /build/mysql.log
2022-12-16 17:49:55 0 [Note] InnoDB: Uses event mutexes
2022-12-16 17:49:55 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2022-12-16 17:49:55 0 [Note] InnoDB: Number of pools: 1
2022-12-16 17:49:55 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2022-12-16 17:49:55 0 [Note] mysqld: O_TMPFILE is not supported on /var/tmp (disabling future attempts)
2022-12-16 17:49:55 0 [Note] InnoDB: Using Linux native AIO
2022-12-16 17:49:55 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2022-12-16 17:49:55 0 [Note] InnoDB: Completed initialization of buffer pool
2022-12-16 17:49:56 0 [Note] InnoDB: 128 rollback segments are active.
2022-12-16 17:49:56 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-12-16 17:49:56 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-12-16 17:49:56 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2022-12-16 17:49:56 0 [Note] InnoDB: 10.5.18 started; log sequence number 45079; transaction id 20
2022-12-16 17:49:56 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-12-16 17:49:56 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2022-12-16 17:49:56 0 [Note] InnoDB: Buffer pool(s) load completed at 221216 17:49:56
SSL error: Private key does not match the certificate public key
Error: -16 17:49:56 0 [ERROR] Failed to setup SSL
Error: -16 17:49:56 0 [ERROR] SSL error: Private key does not match the certificate public key
Error: -16 17:49:56 0 [ERROR] Aborting
+ /usr/libexec/mysqld --version
/usr/libexec/mysqld  Ver 10.5.18-MariaDB for Linux on x86_64 (MariaDB Server)
@junaruga junaruga changed the title Fedora 37 and 38 cases started to fail with SSL error. Fedora 37 and 38 cases fails with SSL error. Dec 16, 2022
@junaruga junaruga changed the title Fedora 37 and 38 cases fails with SSL error. Fedora latest (37) and rawhide (38) cases fail with SSL error. Dec 16, 2022
@junaruga junaruga changed the title Fedora latest (37) and rawhide (38) cases fail with SSL error. Fedora latest (37) and rawhide (38) cases fail with SSL error on MariaDB 10.5.18. Dec 16, 2022
@junaruga
Copy link
Contributor Author

I was able to reproduce this issue on my local environment (host Fedora Linux 37). I am using podman instead of docker, as I don't install docker on my environment.

$ podman build -t mysql2 -f ci/Dockerfile_fedora --build-arg IMAGE=fedora:rawhide .

$ podman run --add-host=mysql2gem.example.com:127.0.0.1 -t mysql2
...
+ /usr/libexec/mysqld --user=root --log-error=/build/mysql.log --ssl
2022-12-16 18:14:17 0 [Note] /usr/libexec/mysqld (mysqld 10.5.18-MariaDB) starting as process 736 ...
+ cat /build/mysql.log
2022-12-16 18:14:17 0 [Note] InnoDB: Uses event mutexes
2022-12-16 18:14:17 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2022-12-16 18:14:17 0 [Note] InnoDB: Number of pools: 1
2022-12-16 18:14:17 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2022-12-16 18:14:17 0 [Note] mysqld: O_TMPFILE is not supported on /var/tmp (disabling future attempts)
2022-12-16 18:14:17 0 [Note] InnoDB: Using Linux native AIO
2022-12-16 18:14:17 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2022-12-16 18:14:17 0 [Note] InnoDB: Completed initialization of buffer pool
2022-12-16 18:14:17 0 [Note] InnoDB: 128 rollback segments are active.
2022-12-16 18:14:17 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-12-16 18:14:17 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-12-16 18:14:17 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2022-12-16 18:14:17 0 [Note] InnoDB: 10.5.18 started; log sequence number 45079; transaction id 20
2022-12-16 18:14:17 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-12-16 18:14:17 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2022-12-16 18:14:17 0 [Note] InnoDB: Buffer pool(s) load completed at 221216 18:14:17
SSL error: Private key does not match the certificate public key
2022-12-16 18:14:18 0 [ERROR] Failed to setup SSL
2022-12-16 18:14:18 0 [ERROR] SSL error: Private key does not match the certificate public key
2022-12-16 18:14:18 0 [ERROR] Aborting
+ /usr/libexec/mysqld --version
/usr/libexec/mysqld  Ver 10.5.18-MariaDB for Linux on x86_64 (MariaDB Server)
+ mysql -u root -e 'CREATE DATABASE IF NOT EXISTS test'
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

@junaruga
Copy link
Contributor Author

junaruga commented Dec 16, 2022

I found the mysqld starts successfully just with the modification below. I am not sure why the script to install SSL configs is needed.

diff --git a/ci/setup_container.sh b/ci/setup_container.sh
index 6bed4d5..0bbb79b 100644
--- a/ci/setup_container.sh
+++ b/ci/setup_container.sh
@@ -4,6 +4,8 @@ set -eux
 
 MYSQL_TEST_LOG="$(pwd)/mysql.log"
 
+bash ci/ssl.sh
+
 mysql_install_db \
   --log-error="${MYSQL_TEST_LOG}"
 /usr/libexec/mysqld \

Now there are some failures in the test related to the permission.
https://github.com/junaruga/mysql2/actions/runs/3715815846/jobs/6301425363#step:4:676

expected no Exception, got #<Mysql2::Error: Access denied for user 'root'@'localhost'> with backtrace:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant