# MaxScale master master

**URL:** <https://forums.percona.com/t/maxscale-master-master/4899>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [May 24, 2016, 7:10am UTC](https://forums.percona.com/t/maxscale-master-master/4899 "2016-05-24T07:10:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![glb\_ussr](https://avatars.discourse-cdn.com/v4/letter/g/87869e/32.png) [@glb\_ussr](https://forums.percona.com/u/glb_ussr)\
**Post date:** [May 24, 2016, 7:10am UTC](https://forums.percona.com/t/maxscale-master-master/4899/1 "2016-05-24T07:10:11Z")

</div>

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

```auto
[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

```auto
#!/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

```

```auto

cat select.sql
insert into employees (d,c) values (2,3);

```

and see this error

```auto

./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

```auto

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

```auto

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)]>

```

---

<div class="post-metadata">

**Author:** ![glb\_ussr](https://avatars.discourse-cdn.com/v4/letter/g/87869e/32.png) [@glb\_ussr](https://forums.percona.com/u/glb_ussr)\
**Post date:** [May 24, 2016, 11:52pm UTC](https://forums.percona.com/t/maxscale-master-master/4899/2 "2016-05-24T23:52:15Z")

</div>

I switch to galeramon and no error.
