My /etc/maxscale.cnf:
<bof>
[maxscale]
threads=4
[Replication]
type=service
router=binlogrouter
user=mxs***
passwd=*****
router_options=server-id=1,user=rep***,password=$$$$$,master-id=1,heartbeat=30,binlogdir=/var/cache/maxscale,transaction_safety=on,master_hostname=hout1,mariadb10-compatibility=1
enable_root_user=1
localhost_match_wildcard_host=true
[hout2]
type=server
address=hout2
port=3306
protocol=MySQLBackend
[hout3]
type=server
address=hout3
port=3306
protocol=MySQLBackend
[hout4]
type=server
address=hout4
port=3306
protocol=MySQLBackend
[MySQL Monitor]
type=monitor
module=mysqlmon
servers=hout2,hout3,hout4
user=root
passwd=$%^&*
monitor_interval=10000
[Read-Only Service]
type=service
router=readconnroute
servers=hout3,hout4
user=root
passwd=$%^&*
router_options=slave
localhost_match_wildcard_host=true
[Read-Write Service]
type=service
router=readwritesplit
servers=hout2,hout3,hout4
user=root
passwd=$%^&*
max_slave_connections=100%
localhost_match_wildcard_host=true
[MaxAdmin Service]
type=service
router=cli
[Replication Listener]
type=listener
service=Replication
protocol=MySQLClient
port=5308
address=0.0.0.0
[Read-Only Listener]
type=listener
service=Read-Only Service
protocol=MySQLClient
port=4306
address=0.0.0.0
[Read-Write Listener]
type=listener
service=Read-Write Service
protocol=MySQLClient
port=3306
address=0.0.0.0
[MaxAdmin Listener]
type=listener
service=MaxAdmin Service
protocol=maxscaled
socket=default
<eof>
My slaves are connection fine:
$ maxadmin list servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server | Address | Port | Connections | Status
-------------------+-----------------+-------+-------------+--------------------
binlog_router_master_host | 172.16.15.20 | 3306 | 1 | Running
hout2 | hout2 | 3306 | 0 | Running
hout3 | hout3 | 3306 | 0 | Slave, Slave of External Server, Running
hout4 | hout4 | 3306 | 0 | Slave, Slave of External Server, Running
-------------------+-----------------+-------+-------------+--------------------
However, I cannot connect to MaxScale on the Read-Write Listener port of 3306 (which I want to have as the default)
# mysql -ufisheagle_app -p -h172.16.15.10
Enter password:
ERROR 1045 (28000): failed to create new session
However:
# mysql -ufisheagle_app -p -h172.16.15.20
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2777
Server version: 10.1.23-MariaDB FreeBSD Ports
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
Why is this?
I see the following error in /var/log/maxscale/maxscale.log:
[readwritesplit] Couldn't find suitable Master from 3 candidates.
Hi Roland, assuming your MaxScale setup is about Binlog Server replication, please note:
currently, MaxScale “mysql monitor” it’s not able to detect the replication setup with:
1 Binlog Server replicating from Master
1 Master
N Slaves replicating from MaxScale Binlog Server.
So you cannot use R/W split in such setup: you need to use replication without binlog server.
I would like to add that another user asked about this setup some months and I replied saying:
"the binlog server setup detection could be added to ‘develop' branch and could be ready for MaxScale next release 2.2"
Massimiliano
>> To unsubscribe from this group and stop receiving emails from it, send an email to maxscale+unsubscribe@googlegroups.com.
On 1 Aug 2017, at 18:46, Roland Giesler <rol...@greentree.systems> wrote:On Tue, Aug 1, 2017 at 4:17 PM, Massimiliano Pinto <massimili...@mariadb.com> wrote:Hi Roland, assuming your MaxScale setup is about Binlog Server replication, please note:
currently, MaxScale “mysql monitor” it’s not able to detect the replication setup with:
1 Binlog Server replicating from Master
1 Master
N Slaves replicating from MaxScale Binlog Server.
So you cannot use R/W split in such setup: you need to use replication without binlog server.This is all very vague, since the documentation lists all the options, but how does one do replication without using binlog?
Is there a how to or clearer documentation about how to get this all done?
I would like to add that another user asked about this setup some months and I replied saying:
"the binlog server setup detection could be added to ‘develop' branch and could be ready for MaxScale next release 2.2"So are you saying MaxScale cannot detect a binlog server setup, but that it could be set up manually? Or am I reading things into your response that you're not saying?
thanks againRoland