sysbench
sysbench copied to clipboard
Connecting to DO MySQL instance, getting "FATAL: error 2026: SSL connection error: unknown error number"
We're trying to get sysbench running on one of DigitalOcean's recently released Managed MySQL containers.
Running the command:
sysbench /usr/share/sysbench/oltp_read_write.lua --mysql-host=<HOST> --mysql port=25060 --mysql-user=<USER> --mysql-password=<REDACTED> --db-driver=mysql --tables=3 --table-size=1000000 prepare
Results in the following error:
sysbench 1.0.17 (using bundled LuaJIT 2.1.0-beta2)
FATAL: unable to connect to MySQL server on host 'db-mysql-nyc1-12965-do-user-690043-0.db.ondigitalocean.com', port 25060, aborting...
FATAL: error 2026: SSL connection error: unknown error number
FATAL: `sysbench.cmdline.call_command' function failed: /usr/share/sysbench/oltp_common.lua:83: connection creation failed
However if we try to connect to this via command line or using DataGrip, it connects just fine. The part that is frustrating is the FATAL: error 2026: SSL connection error: unknown error number
, which clearly sysbench is having an issue connecting, but then passes an unknown error number
. Makes things difficult to debug!
Has anyone run into this problem before?
Same issue. Here is the full example.
$ mysql -u sysbench -P 3306 -h 192.168.1.2 -p --ssl --ssl-cipher="DHE-RSA-AES256-SHA"
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1347997
Server version: 5.5.57-38.9-log Percona Server (GPL), Release 38.9, Revision fc6d4f87a88
Copyright (c) 2009-2017 Percona LLC and/or its affiliates
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> \s
--------------
mysql Ver 14.14 Distrib 5.5.57-38.9, for debian-linux-gnu (x86_64) using readline 5.1
Connection id: 1347997
Current database:
Current user: [email protected]
SSL: Cipher in use is DHE-RSA-AES256-SHA
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.5.57-38.9-log Percona Server (GPL), Release 38.9, Revision fc6d4f87a88
Protocol version: 10
Connection: 192.168.1.2 via TCP/IP
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
TCP port: 3306
Uptime: 4 days 13 min 47 sec
--------------
mysql> Bye
$ sysbench --mysql-port=3306 --mysql-host=192.168.1.2 --mysql-user=sysbench \
--mysql-db=sysbench --mysql-ssl=on --mysql-ssl-cipher="DHE-RSA-AES256-SHA" \
--mysql-password="SECRET" --threads=5 oltp_write_only prepare
sysbench 1.0.19 (using bundled LuaJIT 2.1.0-beta2)
Initializing worker threads...
FATAL: unable to connect to MySQL server on host '192.168.1.2', port 3306, aborting...
FATAL: error 2026: SSL connection error: SSL_CTX_set_default_verify_paths failed
FATAL: unable to connect to MySQL server on host '192.168.1.2', port 3306, aborting...
FATAL: error 2026: SSL connection error: SSL_CTX_set_default_verify_paths failed
FATAL: `sysbench.cmdline.call_command' function failed: /usr/share/sysbench/oltp_common.lua:83: connection creation failed
FATAL: unable to connect to MySQL server on host '192.168.1.2', port 3306, aborting...
FATAL: error 2026: SSL connection error: SSL_CTX_set_default_verify_paths failed
FATAL: `sysbench.cmdline.call_command' function failed: /usr/share/sysbench/oltp_common.lua:83: connection creation failed
FATAL: unable to connect to MySQL server on host '192.168.1.2', port 3306, aborting...
FATAL: error 2026: SSL connection error: SSL_CTX_set_default_verify_paths failed
FATAL: `sysbench.cmdline.call_command' function failed: /usr/share/sysbench/oltp_common.lua:83: connection creation failed
(last message repeated 1 times)
FATAL: unable to connect to MySQL server on host '192.168.1.2', port 3306, aborting...
FATAL: error 2026: SSL connection error: SSL_CTX_set_default_verify_paths failed
FATAL: `sysbench.cmdline.call_command' function failed: /usr/share/sysbench/oltp_common.lua:83: connection creation failed
Long story short: without a client certificate and sysbench 1.0.x, your out of luck. See https://aws.amazon.com/de/blogs/database/running-sysbench-on-rds-mysql-rds-mariadb-and-amazon-aurora-mysql-via-ssl-tls/