Not the answer you need?
Register and ask your own question!

MaxScale master master

glb_ussrglb_ussr EntrantInactive User Role Beginner
Hello. I have test environment with 3 MDB server wit galera and master-master replications. All work fine.
I try configure MaxScale for HA.
This is Maxscale config
[maxscale]
threads=4


[server1]
type=server
address=10.10.15.30
port=3306
protocol=MySQLBackend
myweight=2

[server2]
type=server
address=10.10.15.31
port=3306
protocol=MySQLBackend
myweight=5

[server3]
type=server
address=10.10.15.32
port=3306
protocol=MySQLBackend
myweight=3

[Multi-Master Monitor]
type=monitor
module=mmmon
servers=server1,server2,server3
user=maxscale
passwd=fYwUnK5w
detect_stale_master=true

[Read-Only Service]
type=service
router=readconnroute
router_options=synced
servers=server1,server2,server3
user=maxscale
passwd=fYwUnK5w
enable_root_user=1
weightby=myweight

[Read-Write Service]
type=service
router=readwritesplit
servers=server1,server2,server3
user=maxscale
passwd=fYwUnK5w

enable_root_user=1



[MaxAdmin Service]
type=service
router=cli


[Read-Only Listener]
type=listener
service=Read-Only Service
protocol=MySQLClient
port=4008

[Read-Write Listener]
type=listener
service=Read-Write Service
protocol=MySQLClient
port=3306

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

For test i use this code
#!/bin/bash

mysqlslap \
--user=root \
--password=123 \
--host=10.10.15.33 \
--concurrency=20 \
--number-of-queries=10000 \
--create-schema=employees \
--query="./select.sql" \
--delimiter=";" \
--verbose \
--iterations=2 \
--debug-info
cat select.sql
insert into employees (d,c) values (2,3);

and see this error
./mysqlslap.sh
mysqlslap: Cannot run query insert into employees (d,c) values (2,3) ERROR : Lost connection to MySQL server during query

In log file
May 24 18:37:21 ubuntuMaxScale maxscale[25118]: Server at 10.10.15.30:3306 should be master but is RUNNING MASTER instead and can't be chosen to master.
May 24 18:37:21 ubuntuMaxScale maxscale[25118]: Routing the query failed. Session will be closed.
May 24 18:37:21 ubuntuMaxScale maxscale[25118]: Server at 10.10.15.30:3306 should be master but is RUNNING MASTER instead and can't be chosen to master.
May 24 18:37:21 ubuntuMaxScale maxscale[25118]: Routing the query failed. Session will be closed.

If i do this request manual, all fine
Server version: 10.0.0 1.4.3-maxscale mariadb.org binary distribution

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MySQL [(none)]> insert into employees.employees (d,c) values (2,3);
Query OK, 1 row affected (0.00 sec)

MySQL [(none)]> insert into employees.employees (d,c) values (2,3);
Query OK, 1 row affected (0.00 sec)

MySQL [(none)]>

Comments

  • glb_ussrglb_ussr Entrant Inactive User Role Beginner
    I switch to galeramon and no error.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.