Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.4.3, 2.0.2
-
reproduced on Ubuntu Xenial with Master - Master.
reproduced with MariaDB 10.1 and MySQL 5.6 Master <-> Master
Description
Steps to reproduce:
Create a Master <-> Master replication.
With docker:
docker run \
--name master101 \
-d \
-p 32810:3306 \
-e MYSQL_ROOT_PASSWORD=maria2016 \
mariadb:10.1 \
--server-id=7 \
--log-bin
docker run \
--name master102 \
-d \
-p 32811:3306 \
-e MYSQL_ROOT_PASSWORD=maria2016 \
mariadb:10.1 \
--server-id=8 \
--log-bin
Execute on both server
GRANT REPLICATION SLAVE ON . TO 'repl'@'%'
IDENTIFIED BY 'slave2016';
Execute on master101
show master status;CHANGE MASTER TO
MASTER_HOST='127.0.0.1',
MASTER_PORT='32821'
MASTER_USER='repl',
MASTER_PASSWORD='slave2016';
Execute on master102
show master status;CHANGE MASTER TO
MASTER_HOST='127.0.0.1',
MASTER_PORT='32820'
MASTER_USER='repl',
MASTER_PASSWORD='slave2016';
Execute both server:
start slave;
CREATE USER 'maxscale'@'%' IDENTIFIED BY 'maxscale';
GRANT EXECUTE, PROCESS, SELECT, SHOW DATABASES, SHOW VIEW, ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE TABLESPACE, CREATE TEMPORARY TABLES, CREATE VIEW, DELETE, DROP, EVENT, INDEX, INSERT, REFERENCES, TRIGGER, UPDATE, CREATE USER, FILE, LOCK TABLES, RELOAD, REPLICATION CLIENT, REPLICATION SLAVE, SHUTDOWN, SUPER ON . TO 'mm'@'%';
Install Maxscale 2.0.2 with attach configuration file (copy to /etc)
copy test.sh to /var/lib/maxscale
execute
sudo service maxscale start;
docker stop master101;
result:
root 21165 0.1 0.0 332652 8736 ? Ssl 12:32 0:06 /usr/bin/maxscale -d
maxscale 23707 0.1 0.0 287900 9304 ? Ssl 14:05 0:00 /usr/bin/maxscale --user=maxscale
maxscale 23741 0.0 0.0 0 0 ? Z 14:09 0:00 [test.sh] <defunct>
Output from failover.log from test.sh
2016.12.01 14:09:21 : --event 'master_down' --initiator '127.0.0.1:32810' --nodelist '127.0.0.1:32811' –
###############
maxscale log with info and debug enabled:
2016-12-01 14:13:43 error : Monitor was unable to connect to server 127.0.0.1:32810 : "Lost connection to MySQL server at 'handshake: reading inital communication packet', system error: 115"
2016-12-01 14:13:43 debug : Backend server 127.0.0.1:32810 state : DOWN
2016-12-01 14:13:43 notice : Server changed state: server1[127.0.0.1:32810]: master_down. [Master, Running] -> [Down]
2016-12-01 14:13:43 debug : [monitor_exec_cmd] Forked child process 23938 : /var/lib/maxscale/test.sh.
2016-12-01 14:13:43 notice : Executed monitor script '/var/lib/maxscale/test.sh --event=$EVENT --initiator=$INITIATOR --nodelist=$NODELIST' on event 'master_down'.
2016-12-01 14:13:43 debug : 139833263933184 [dcb_hangup_foreach]
Richard Stracke