Bug #113295 MySQL Router missing router.so
Submitted: 30 Nov 2023 15:57 Modified: 1 Dec 2023 11:55
Reporter: Marco Tusa Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Router Documentation Severity:S2 (Serious)
Version:8.2 OS:Linux
Assigned to: CPU Architecture:x86
Tags: documentation

[30 Nov 2023 15:57] Marco Tusa
Description:
After installation using rpm or Linux generic.
When using the read/write option as:
[router:read_write_split]
bind_port=6450
destinations=metadata-cache://grtest/?role=PRIMARY_AND_SECONDARYrouting_strategy=round-robin
access_mode=auto
protocol=classic
connection_sharing=1

The router fails to start with the error:
Error: Loading plugin for config-section '[router:read_write_split]' failed: /usr/lib64/mysqlrouter/router.so: cannot open shared object file: No such file or directory
The router.so is actually NOT present in both packages as:
[root@ip-10-0-1-96 opt]# rpm2cpio mysql-router-community-8.2.0-1.el7.x86_64.rpm| cpio -idmv
./etc/logrotate.d/mysqlrouter
./etc/mysqlrouter
./etc/mysqlrouter/mysqlrouter.conf
./usr/bin/mysqlrouter
./usr/bin/mysqlrouter_keyring
./usr/bin/mysqlrouter_passwd
./usr/bin/mysqlrouter_plugin_info
./usr/lib/systemd/system/mysqlrouter.service
./usr/lib/tmpfiles.d/mysqlrouter.conf
./usr/lib64/mysqlrouter
./usr/lib64/mysqlrouter/connection_pool.so
./usr/lib64/mysqlrouter/destination_status.so
./usr/lib64/mysqlrouter/http_auth_backend.so
./usr/lib64/mysqlrouter/http_auth_realm.so
./usr/lib64/mysqlrouter/http_server.so
./usr/lib64/mysqlrouter/io.so
./usr/lib64/mysqlrouter/keepalive.so
./usr/lib64/mysqlrouter/metadata_cache.so
./usr/lib64/mysqlrouter/private
./usr/lib64/mysqlrouter/private/libmysqlharness.so.1
./usr/lib64/mysqlrouter/private/libmysqlharness_stdx.so.1
./usr/lib64/mysqlrouter/private/libmysqlharness_tls.so.1
./usr/lib64/mysqlrouter/private/libmysqlrouter.so.1
./usr/lib64/mysqlrouter/private/libmysqlrouter_connection_pool.so.1
./usr/lib64/mysqlrouter/private/libmysqlrouter_destination_status.so.1
./usr/lib64/mysqlrouter/private/libmysqlrouter_http.so.1
./usr/lib64/mysqlrouter/private/libmysqlrouter_http_auth_backend.so.1
./usr/lib64/mysqlrouter/private/libmysqlrouter_http_auth_realm.so.1
./usr/lib64/mysqlrouter/private/libmysqlrouter_io_component.so.1
./usr/lib64/mysqlrouter/private/libmysqlrouter_metadata_cache.so.1
./usr/lib64/mysqlrouter/private/libmysqlrouter_mysqlxmessages.so.1
./usr/lib64/mysqlrouter/private/libmysqlrouter_routing.so.1
./usr/lib64/mysqlrouter/private/libprotobuf-lite.so.3.19.4
./usr/lib64/mysqlrouter/rest_api.so
./usr/lib64/mysqlrouter/rest_connection_pool.so
./usr/lib64/mysqlrouter/rest_metadata_cache.so
./usr/lib64/mysqlrouter/rest_router.so
./usr/lib64/mysqlrouter/rest_routing.so
./usr/lib64/mysqlrouter/router_openssl.so
./usr/lib64/mysqlrouter/router_protobuf.so
./usr/lib64/mysqlrouter/routing.so
./usr/share/doc/mysql-router-community-8.2.0
./usr/share/doc/mysql-router-community-8.2.0/INFO_BIN
./usr/share/doc/mysql-router-community-8.2.0/INFO_SRC
./usr/share/doc/mysql-router-community-8.2.0/LICENSE.router
./usr/share/doc/mysql-router-community-8.2.0/README.router
./usr/share/man/man1/mysqlrouter.1.gz
./usr/share/man/man1/mysqlrouter_passwd.1.gz
./usr/share/man/man1/mysqlrouter_plugin_info.1.gz
./var/log/mysqlrouter
./var/run/mysqlrouter
47828 blocks

How to repeat:
Download the mysql router rpm package mysql-router-community-8.2.0-1.el7.x86_64.rpm or Linux generic mysql-router-8.2.0-linux-glibc2.17-x86_64.tar.xz

unpack/install and start mysqlrouter with the R/W split configuration
[30 Nov 2023 16:29] Marco Tusa
Ok folks found the issue
the call is driven by the configuration which is taken from the official documentation that is wrong:
https://dev.mysql.com/doc/mysql-router/8.2/en/router-read-write-splitting-configuration.ht...

[router:read_write_split] is wrong
[routing:read_write_split] is correct
[30 Nov 2023 16:30] Marco Tusa
add tag as this is a documentation issue
[30 Nov 2023 16:39] MySQL Verification Team
Hello Marco Tusa,

Thank you for the report and feedback.

Thanks,
Umesh
[1 Dec 2023 11:55] Edward Gilmore
Posted by developer:
 
Updated configuration example in MySQL Router 8.2 documentation.

Thank you for the bug report.