[MXS-108] Master / Slave Status of Servers not detected for RW split Created: 2015-04-22 Updated: 2015-06-02 Resolved: 2015-06-02 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | mariadbmon |
| Affects Version/s: | 1.1.0 |
| Fix Version/s: | 1.2.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | André Bauer | Assignee: | markus makela |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 14.04 |
||
| Description |
|
I just tried to use the RW Split Router but don’t get it work because skygw_err1.log says:
My replication works. Master and Slave Servers are running MariaDB 10.0.17. My configuration looks like:
output of "/usr/local/mariadb-maxscale/bin/maxadmin -pmariadb show servers" says:
Whats the Problem? |
| Comments |
| Comment by markus makela [ 2015-04-22 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
You seem to be missing the monitor_interval paremeter. Setting it to a value of 1000 should be a good starting point. I will add the missing log messages in case of the missing parameter. If this doesn't solve your problem, you can try enabling the trace log for more information. You can enable it by adding log_trace=1 under the [maxscale] section. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by André Bauer [ 2015-04-22 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for your help Addind monitor_interval did not help. Activated trace log but it seems there is no info about the problem:
| |||||||||||||||||||||||||||||||||||||||||||||
| Comment by markus makela [ 2015-04-24 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
The mysqlmon sends a SHOW SLAVE STATUS to all servers. If Slave_IO_Running and Slave_SQL_Running are both Yes, then the server is seen as a slave. After slaves are found, the master is found by building a replication tree based on the server_id of each server. The monitor tries to find the master by locating the node with the lowest depth i.e. the "root master" of the tree. At this point, if the replication is OK but the slave_IO is not running on the slave, the master can't be found because the replication is not active. MaxScale sees this as broken replication and will set the states of the servers to Running but not Master/Slave. If you can confirm that Slave_IO is running and the Master_Server_id is the server id of the master from the output of a SHOW SLAVE STATUS to the slave, it would confirm that the replication is in working order. Otherwise your configuration seems to be correct. Since the error and trace logs are empty, I would imagine that MaxScale is not considering this an erroneous state of MaxScale but broken replication. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by André Bauer [ 2015-04-24 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
This is the output of "mysql -e 'SHOW SLAVE STATUS\G'":
As you can see, replikation is working and Master Server id is 1. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by markus makela [ 2015-04-27 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Does the 'maxscale' user have enough permissions? The monitor user needs the grants to execute the SHOW SLAVE STATUS to be able to resolve the replication tree. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by André Bauer [ 2015-05-13 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Sorry for de delayed answer. I was on vacation. Giving replication rights t other user solved the problem Imho the documentation should be updated. Question: What happens when master or slave dies? Thanks for your help again. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by markus makela [ 2015-05-13 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
No problem, I'm glad this was resolved. If an external mechanism is used to change the master to a new one MaxScale will notice it if the new master is in configuration file. The documentation does have this information but it is in the Configuration Guide: https://github.com/mariadb-corporation/MaxScale/blob/master/Documentation/Getting-Started/Configuration-Guide.md#user | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by markus makela [ 2015-06-02 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
This was due to the maxscale user lacking privileges. |