The problem with maxscale for multi-master cluster

Hello.

I have 2 mysql servers with multi-master replication.

And i need use maxscale.

My config:

[maxscale]
threads=auto

[db1]
type=server
address=172.31.6.70
port=3306
protocol=MariaDBBackend

[db2]
type=server
address=172.31.6.71
port=3306
protocol=MariaDBBackend

[PerconaDB-Monitor]
type=monitor
module=mariadbmon
servers=db1,db2
user=maxscale
password=5D68B4AA55F84B754DDEB891CE7A2180
monitor_interval=1000
detect_stale_master=true

[Read-Write-Router]
type=service
router=readwritesplit
servers=db1,db2
user=maxscale
password=5D68B4AA55F84B754DDEB891CE7A2180
enable_root_user=1

[MaxAdmin-Service]
type=service
router=cli

[MaxAdmin Listener]
type=listener
service=MaxAdmin Service
protocol=maxscaled
port=6603

[Read-Write-Listener]
type=listener
service=Read-Write-Router
protocol=mariadbclient
port=3306

When i run the command - maxadmin -pmariadb list servers

I see

db1 | 172.31.6.70 | 3306 | 0 | Running
db2 | 172.31.6.71 | 3306 | 0 | Running

None of the servers is a master

And in logs i see:

error : [readwritesplit] Couldn't find suitable Master from 2 candidates.

When i stop 1 servers in my multi-master cluster, maxscale at once sees master and everything is ok

db1 | 172.31.6.70  |  3306 | 0 | Master, Running
db2 | 172.31.6.71  |  3306 | 0 | Down

Why do i get error when 2 masters is online?

Could you help me?

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.