Hello.
I installed the program as described here
https://dev.mysql.com/doc/mysql-router/8.0/en/mysql-router-deploying-bootstrapping.html.
After installation, the service "mysqlrouter" was launched in the system. But this service does not listen any of the ports specified in the configuration file "/etc/mysqlrouter/mysqlrouter.conf".
Command "lsof -i -P -n | grep LISTEN" shows:
systemd-r 780 systemd-resolve 13u IPv4 17461 0t0 TCP 127.0.0.53:53 (LISTEN)
sshd 1140 root 3u IPv4 20873 0t0 TCP *:22 (LISTEN)
sshd 1140 root 4u IPv6 20890 0t0 TCP *:22 (LISTEN)
As you can see, only port 22 is listening.
To make the mysqlrouter listen to the port, I have to start it as a new process, using command "mysqlrouter -c /etc/mysqlrouter/mysqlrouter.conf &".
After that, mysqlrouter listening the port.
What's wrong with this software?
Why it install new service (daemon), but this service does nothing?
I can stop service by "sudo service mysqlrouter stop" and it will no affect anything, because separated process working, which I have run with command "mysqlrouter -c /etc/mysqlrouter/mysqlrouter.conf &".
This is looks like that the service does not load the configuration file "/etc/mysqlrouter/mysqlrouter.conf" during startup, and uses default (empty) configuration, which not listening anything.
My configuration file contains as following:
[DEFAULT]
name=system
user=root
keyring_path=/var/lib/mysqlrouter/keyring
master_key_path=/etc/mysqlrouter/mysqlrouter.key
connect_timeout=15
read_timeout=30
dynamic_state=/var/lib/mysqlrouter/state.json
[logger]
level = INFO
[metadata_cache:personal]
router_id=7
user=mysql_router7_kj7msssz96w6
metadata_cluster=personal
ttl=0.5
[routing:default]
bind_address=0.0.0.0
bind_port=3306
destinations=metadata-cache://personal/default?role=PRIMARY
routing_strategy=first-available
protocol=classic
Edited 1 time(s). Last edit at 06/30/2019 05:14AM by Vladmi Ivanochkenzoprano.