Bug #104587 Warning should be removed from the error log when tls_version is empty
Submitted: 10 Aug 2021 23:57 Modified: 11 Aug 2021 6:40
Reporter: Kaige Ye (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:8.0.26 OS:Linux
Assigned to: CPU Architecture:Any

[10 Aug 2021 23:57] Kaige Ye
Description:
According to the doc:
https://dev.mysql.com/doc/refman/8.0/en/server-options.html#option_mysqld_ssl

"Set the tls_version system variable to the empty value to indicate that no TLS versions are supported."

I tried to start mysqld with:

[mysqld]
tls_version=''

but I got:

2021-08-11T07:38:00.863467+08:00 0 [System] [MY-010116] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.26-debug) starting as process 10077
2021-08-11T07:38:00.900877+08:00 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-08-11T07:38:01.693340+08:00 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-08-11T07:38:03.590793+08:00 0 [Warning] [MY-013595] [Server] Failed to initialize TLS for channel: mysql_main. See below for the description of exact issue.
2021-08-11T07:38:03.591557+08:00 0 [Warning] [MY-010069] [Server] Failed to set up SSL because of the following SSL library error: TLS version is invalid
2021-08-11T07:38:03.823415+08:00 0 [Warning] [MY-011302] [Server] Plugin mysqlx reported: 'Failed at SSL configuration: "SSL context is not usable without certificate and private key"'
2021-08-11T07:38:03.823792+08:00 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
2021-08-11T07:38:03.824071+08:00 0 [System] [MY-010931] [Server] /usr/local/mysql/bin/mysqld: ready for connections. Version: '8.0.26-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution.

If I start the server with `--ssl=OFF`, there is no warnings in the error log.
If the `--ssl=OFF` should be deprecated by `tls_version=''`, the warings seems like should been removed. It confused me when I want to disabled TLS, I don't know if those warnings mean something was broken inside the server.

How to repeat:
use this config to start mysqld:

[mysqld]
tls_version=''
[11 Aug 2021 6:40] MySQL Verification Team
Hello Kaige Ye,

Thank you for the report and feedback.

regards,
Umesh
[14 Jan 2022 15:41] Kevin Farley
Just to expand on the bug report, I DO receive a deprecation warning when I use `skip_ssl` in the my.cnf, but when I use the method outlined in the documentation, replacing it with `tls_version=''`, I end up with the same warnings outlined in the bug report.  So I'm getting an error no matter which method is in use to disable SSL which is very confusing.

The expected behaviour when setting `tls_version` to NULL as per the documentation, is that there should be no TLS related errors when starting the service. Instead I'm receiving errors for `mysql_main` and `mysqlx`.
[7 Feb 2023 14:56] Arnold Slootweg
I also see this behaviour in 8.0.32:
2023-02-07T14:28:37.748384Z 0 [Warning] [MY-013595] [Server] Failed to initialize TLS for channel: mysql_main. See below for the description of exact issue.
2023-02-07T14:28:37.748411Z 0 [Warning] [MY-010069] [Server] Failed to set up SSL because of the following SSL library error: TLS version is invalid
2023-02-07T14:28:37.817787Z 0 [Warning] [MY-011302] [Server] Plugin mysqlx reported: 'Failed at SSL configuration: "SSL context is not usable without certificate and private key"'
2023-02-07T14:28:37.820962Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.32'  socket: '/luci/data0/mysql/mysql.sock'  port: 3306  MySQL Community Server - GPL.
2023-02-07T14:28:37.821047Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock

Regards,
Arnold
[27 Oct 2023 5:51] MySQL Verification Team
Bug #112849 marked as duplicate of this one
[27 Oct 2023 15:08] Ken NA
I'm having the same issue with MySQL v8.0.33 :

2023-10-27T03:48:14.102726Z 0 [Warning] [MY-013595] [Server] Failed to initialize TLS for channel: mysql_main. See below for the description of exact issue.
2023-10-27T03:48:14.102759Z 0 [Warning] [MY-010069] [Server] Failed to set up SSL because of the following SSL library error: TLS version is invalid