Bug #110751 rhel8 rpm : mysqlrouter 8.0.33 aborts initial connection
Submitted: 20 Apr 2023 15:50 Modified: 24 Apr 2023 13:23
Reporter: Fred Milonni Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Router Severity:S3 (Non-critical)
Version:8.0.33 and 8.0.33 OS:Red Hat ( 8.4 (Ootpa))
Assigned to: CPU Architecture:x86

[20 Apr 2023 15:50] Fred Milonni
Description:
As decribed here :

https://forums.mysql.com/read.php?146,708761,708761#msg-708761

# mysqlrouter --bootstrap myuser@dbp01:3306 --conf-bind-address 127.0.0.1 --account myuser --user mysqlrouter --account-create never --force
Please enter MySQL password for myuser:
# Bootstrapping system MySQL Router instance...

Please enter MySQL password for myuser:
- Using existing certificates from the '/var/lib/mysqlrouter' directory
- Verifying account (using it to run SQL queries that would be run by Router)
- Storing account in keyring
- Adjusting permissions of generated files
- Creating configuration /etc/mysqlrouter/mysqlrouter.conf
Error: Error executing MySQL query "select view_id from mysql_innodb_cluster_metadata.v2_ar_members where CAST(member_id AS char ascii) = CAST(@@server_uuid AS char ascii)": Lost connection to MySQL server during query (2013)
#

How to repeat:
create both above linux user and mysql user and relaunch the command

******************************************************
IMPORTANT
******************************************************
as described in forum, the mysqlrouter binary is ok when i build it in the target server : 

# ./runtime_output_directory/mysqlrouter --bootstrap myuser@dpb01:3306 --conf-bind-address 127.0.0.1 --account myuser --user mysqlrouter --account-create never --force
Please enter MySQL password for routeur_monis_user:
# Bootstrapping system MySQL Router instance...

Please enter MySQL password for routeur_monis_user:
- Verifying account (using it to run SQL queries that would be run by Router)
- Storing account in keyring
- Adjusting permissions of generated files
- Creating configuration /logs/fred/mysql-8.0.33/build/mysqlrouter.conf

# MySQL Router configured for the InnoDB ReplicaSet 'dbreplica1'

After this MySQL Router has been started with the generated configuration

$ /etc/init.d/mysqlrouter restart
or
$ systemctl start mysqlrouter
or
$ ./runtime_output_directory/mysqlrouter -c /logs/fred/mysql-8.0.33/build/mysqlrouter.conf

InnoDB ReplicaSet 'dbreplica1' can be reached by connecting to:

## MySQL Classic protocol

- Read/Write Connections: localhost:6446
- Read/Only Connections: localhost:6447

## MySQL X protocol

- Read/Write Connections: localhost:6448
- Read/Only Connections: localhost:6449

#

Suggested fix:

Look at the rpm building
[20 Apr 2023 16:29] Fred Milonni
The fix is to do a 'yum update', rhel 8.4 becomes 8.7
[21 Apr 2023 12:42] MySQL Verification Team
Hi Mr. Milonni,

Thank you for your bug report.

Please, confirm that you have found a solution for the problem by upgrading the OS.
[24 Apr 2023 9:29] Fred Milonni
yes a yum update fixes the issue

the router specfile should be fixed to incluse minimal requirements, this is not the case apparently
[24 Apr 2023 13:23] MySQL Verification Team
Thank you for the report