Bug #110623 Connection fails with "Couldn't read RSA public key from server"
Submitted: 6 Apr 2023 9:06 Modified: 6 Aug 2023 14:21
Reporter: S ub Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Router Severity:S2 (Serious)
Version:8.0.34-1.el9 OS:CentOS (9 stream)
Assigned to: CPU Architecture:x86

[6 Apr 2023 9:06] S ub
Description:
Following update from 8.0.32 from 8.0.31, the database connection is not working anymore from the application (Zabbix) to the MySQL router loopback.
According the application error message:
"[Z3001] connection to database 'zabbix' failed: [2061] Couldn't read RSA public key from server"

Log from MySQL router:
[...]
2023-04-06 10:28:58 metadata_cache DEBUG [7f2cb82be640] End updating cluster for 'ZabbixCluster'
2023-04-06 10:28:58 metadata_cache DEBUG [7f2cb82be640] Finished refreshing the cluster metadata
2023-04-06 10:28:58 routing DEBUG [7f2cba2c2640] [routing:bootstrap_rw] fd=71 connection accepted at 0.0.0.0:6446
2023-04-06 10:28:58 routing DEBUG [7f2cc12d0640] [routing:bootstrap_rw] connected 127.0.0.1:35682 -> [hidden]:3306
2023-04-06 10:28:58 routing DEBUG [7f2cc12d0640] [routing:bootstrap_rw] fd=71 -- 75: connection closed (up: 137b; down: 258b)
2023-04-06 10:28:58 routing DEBUG [7f2cc12d0640] [routing:bootstrap_rw] fd=71 -- (not connected): connection closed (up: 137b; down: 258b)
2023-04-06 10:28:58 metadata_cache DEBUG [7f2cb82be640] Started refreshing the cluster metadata
[...]

Wireshark analyze:
8.0.31 (Zabbix <-> MySQLrouter): no encryption
[...]
--> Login Request
<-- ACK
<-- Auth Switch Request (Auth Method Name: 0103, Auth Method Data: *empty*)
<-- Response OK
--> ACK
--> Request Query
<-- Response OK
--> Request Query
<-- Response OK
--> Request Use Database
<-- Response OK
[...]

8.0.32 (Zabbix <-> MySQLrouter):
[...]
--> Login Request
<-- ACK
<-- Response OK
--> Request Use Database
<-- Response Error 1156
<-- FIN

The direct connection (without MySQL router) works as expected. For information the Zabbix version is 6.4.1

How to repeat:
Upgrade to 8.0.32

Suggested fix:
Downgrade to 8.0.31
[6 Apr 2023 10:30] MySQL Verification Team
Thanks for the report
[6 Apr 2023 11:57] S ub
I mean "Following an update from 8.0.31 to 8.0.32"
[6 Aug 2023 14:21] S ub
Same issue following upgrade. Any update ? It's blocking point ... no upgrade is possible anymore.
[24 Aug 2023 6:07] Jan Kneschke
Posted by developer:
 
Reopened as Bug#112167