[MXS-3423] MaxScale binlogrouter(binlog server) fail-over error Created: 2021-03-01  Updated: 2021-08-25  Resolved: 2021-08-25

Status: Closed
Project: MariaDB MaxScale
Component/s: binlogrouter
Affects Version/s: 2.4.9
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: cheonjinho Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Environment:

Centos7, mariadb10.4.12



 Description   

If I set binlogrouter, fail-over doesn't work properly Please give me an answer!

servers:

server1(master) : 192.168.56.101
server2(slave1) : 192.168.56.102
server3(slave2) : 192.168.56.103

maxscale.cnf :

[server1]
type=server
address=192.168.56.101
port=3306
protocol=mariadbbackend
 
[server2]
type=server
address=192.168.56.102
port=3306
protocol=mariadbbackend
 
[server3]
type=server
address=192.168.56.103
port=3306
protocol=mariadbbackend
 
[MariaDB-Monitor]
type=monitor
module=mariadbmon
servers=server1,server2,server3
user=user
password=pass
monitor_interval=2000
auto_failover=true
auto_rejoin=true
enforce_read_only_slaves=on
 
[Replication]
type=service
router=binlogrouter
user=dbadmin
password=tprPdlfemdDBA1#
server_id=1
#master_id=101
mariadb10-compatibility=1
version_string=10.4.12-log
binlogdir=/data/DBSpace/BINLOG/
mariadb10_master_gtid=1
 
[Replication-Listener]
type=listener
service=Replication
protocol=MariaDBClient
port=3390

1.binlogrouter > master Replicaion setting

change master to master_host ='192.168.56.101', master_port=3306, master_user='user', master_password='pass', master_log_file='bin-log.000001', master_log_pos=4;
 
Slave_IO_State: Binlog Dump
                  Master_Host: 192.168.56.101
                  Master_User: user
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: bin-log.000009
          Read_Master_Log_Pos: 340
               Relay_Log_File: bin-log.000009
                Relay_Log_Pos: 340
        Relay_Master_Log_File: bin-log.000009
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes

2. Slave1,2 > binlogrouter GTID replicaion setting

slave1 > change master to master_host='192.168.56.10', master_port=3306, master_user='user', master_password='pass', master_use_gtid=slave_pos;
 
Slave_IO_State:
                   Master_Host: 192.168.56.10
                   Master_User: user
                   Master_Port: 3390
                 Connect_Retry: 60
               Master_Log_File: bin-log.000009
           Read_Master_Log_Pos: 340
                Relay_Log_File: relay-log.000002
                 Relay_Log_Pos: 637
         Relay_Master_Log_File: bin-log.000009
              Slave_IO_Running: Yes
             Slave_SQL_Running: Yes
 
slave2 > change master to master_host='192.168.56.10', master_port=3306, master_user='user', master_password='pass', master_use_gtid=slave_pos;
 
Slave_IO_State:
                   Master_Host: 192.168.56.10
                   Master_User: user
                   Master_Port: 3390
                 Connect_Retry: 60
               Master_Log_File: bin-log.000009
           Read_Master_Log_Pos: 340
                Relay_Log_File: relay-log.000002
                 Relay_Log_Pos: 637
         Relay_Master_Log_File: bin-log.000009
              Slave_IO_Running: Yes
             Slave_SQL_Running: Yes

3.binlogrouter > master GTID Replicaion setting

binlogrouter> change master to master_host='192.168.56.101', master_port=3306, master_user='user', master_password='pass', master_use_gtid=slave_pos;
 
Slave_IO_State: Binlog Dump
                  Master_Host: 192.168.56.101
                  Master_User: user
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: bin-log.000009
          Read_Master_Log_Pos: 340
               Relay_Log_File: bin-log.000009
                Relay_Log_Pos: 340
        Relay_Master_Log_File: bin-log.000009
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes

4. maxctrl list server

maxctrl list servers
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ Server                                │ Address        │ Port │ Connections │ State                             │ GTID     │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ binlog_router_master_host_Replication │ _none_         │ 3360 │ 1           │ Running                           │          │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ server1                               │ 192.168.56.101 │ 3306 │ 0           │ Master, Running                   │ 0-101-60 │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ server2                               │ 192.168.56.102 │ 3306 │ 0           │ Slave of External Server, Running │ 0-101-60 │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ server3                               │ 192.168.56.103 │ 3306 │ 0           │ Slave of External Server, Running │ 0-101-60 │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

5. master down

┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ Server                                │ Address        │ Port │ Connections │ State                             │ GTID     │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ binlog_router_master_host_Replication │ _none_         │ 3306 │ 0           │ Running                           │          │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ server1                               │ 192.168.56.101 │ 3306 │ 0           │ Down                              │ 0-101-60 │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ server2                               │ 192.168.56.102 │ 3306 │ 0           │ Slave of External Server, Running │ 0-101-60 │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ server3                               │ 192.168.56.103 │ 3306 │ 0           │ Slave of External Server, Running │ 0-101-60 │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Master doesn't convert. Is there anything I set wrong?



 Comments   
Comment by markus makela [ 2021-08-25 ]

The failover in MaxScale 2.4 doesn't support failing over binlogrouter connections.

Generated at Thu Feb 08 04:21:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.