Authentication to MaxScale fails, but works fine to Mariadb

925 views
Skip to first unread message

Roland

unread,
Aug 1, 2017, 9:38:28 AM8/1/17
to MaxScale
I have MXS at 172.6.15.10 with a master Mariadb at 172.16.15.20 and two slaves at 172.16.15.21 and 172.16.15.22 as slaves.

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.


Massimiliano Pinto

unread,
Aug 1, 2017, 9:46:36 AM8/1/17
to Roland, MaxScale
Hi Roland,

as you can see from "list severs”: no Master, no Slaves states

It seems you’re using Binlog Server: currently is not possible to detect Binlog Server replication setup with “mysql monitor”.

From "list severs” I see the slaves are not replicating from host “hout2”, which should be the master (172.16.15.20).


Massimiliano
> --
> You received this message because you are subscribed to the Google Groups "MaxScale" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to maxscale+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Massimiliano Pinto

unread,
Aug 1, 2017, 10:17:32 AM8/1/17
to Roland, MaxScale
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

Roland Giesler

unread,
Aug 1, 2017, 12:46:47 PM8/1/17
to Massimiliano Pinto, MaxScale
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 again

Roland
 



Massimiliano
>> To unsubscribe from this group and stop receiving emails from it, send an email to maxscale+unsubscribe@googlegroups.com.

Massimiliano Pinto

unread,
Aug 1, 2017, 1:21:23 PM8/1/17
to Roland Giesler, MaxScale
Hi Roland,


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?

You can create a Master/Slave replication setup without using Binlog Server: just configure one or more Slaves to replicate directly from Master:

say, “hout4" and “hout3" replicate from Master “hout2".


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?


I said that currently it’s not possible to use mysql monitor with a binlog server setup:
mysql monitor expects a replication tree where Slaves replicate from a Master server.
Due to some internal features of Binlog Server the "mysql monitor” is not able to build such tree.

Of course we have an idea about possible implementation for that, Binlog server and Mysql monitor, but no plans yet.

When the code implementation starts, we will update the “development” branch or another one n our GitHub repo.



thanks again

Roland
 

Feel free to contact us if you have any issue setting up a Master/Slave replication.



Massimiliano
Reply all
Reply to author
Forward
0 new messages