[MXS-3350] monitor server's state not change Created: 2020-12-22  Updated: 2021-09-02  Resolved: 2021-09-02

Status: Closed
Project: MariaDB MaxScale
Component/s: binlogrouter
Affects Version/s: 2.5.6
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Wilson Lau Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None

Attachments: PNG File image-2020-12-22-09-38-25-209.png     PNG File screenshot-1.png    

 Description   



 Comments   
Comment by Johan Wikman [ 2020-12-22 ]

Please provide your config.

Comment by Wilson Lau [ 2020-12-22 ]

servers.cnf:

    [node1]
    type=server
    address=galera-0.galera-headless.galera
    port=3306
    protocol=MariaDBBackend
 
    [binlog1]
    type=server
    address=binlog-0.binlog-headless.maxscale
    port=3306
    protocol=MariaDBBackend
    rank=secondary
    
    [slave1]
    type=server
    address=mariadb-0.mariadb-headless.mariadb-x
    port=3306
    protocol=MariaDBBackend
 
    [slave2]
    type=server
    address=mariadb-1.mariadb-headless.mariadb-x
    port=3306
    protocol=MariaDBBackend

monitors.cnf:

    [galera]
    type=monitor
    module=galeramon
    servers=node1
    user=smartms
    password=**
    monitor_interval=2000    
    disable_master_failback=1   
    script=/var/opt/maxscale/monitor.sh --event=$EVENT --master_list=$MASTERLIST --synced_list=$SYNCEDLIST
 
    [slave]
    type=monitor
    module=mariadbmon
    servers=slave1,slave2,binlog1
    user=smartms
    password=*****    
    enforce_read_only_slaves=true
    script=/var/opt/maxscale/monitor.sh --event=$EVENT --master_list=$MASTERLIST --slave_list=$SLAVELIST
 

services.cnf:

    [rw-service]
    type=service
    router=readwritesplit
    servers=node1,slave1,slave2
    user=smartms
    password=***
    use_sql_variables_in=master
    connection_keepalive=20
    master_accept_reads=false
    max_sescmd_history=1000
    transaction_replay_retry_on_deadlock=true
 
    [rw-listener]
    type=listener
    service=rw-service
    protocol=MariaDBClient
    port=4006
    
    [w-service]
    type=service
    router=readconnroute
    cluster=galera
    user=smartms
    password=***
    router_options=master
 
    [w-listener]
    type=listener
    service=w-service
    protocol=MariaDBClient
    port=4007
 
    [r-service]
    type=service
    router=readconnroute
    servers=slave1,slave2,node1
    user=smartms
    password=***
    router_options=slave
 
    [r-listener]
    type=listener
    service=r-service
    protocol=MariaDBClient
    port=4008

Comment by Wilson Lau [ 2020-12-22 ]

pls help to review, thanks

Comment by Johan Wikman [ 2020-12-22 ]

What is the expected outcome? Where are those servers marked as slaves replicating from?

Comment by Wilson Lau [ 2020-12-22 ]

slave replicating from binlogserver, binlogserver replicating from master,

each show slave stauts is right , but maxscale's monitor unable to display its state

expected outcome is:

slave server's state should be slave, not running

Comment by markus makela [ 2021-08-02 ]

wilsonlau have you tried if it works with assume_unique_hostnames=false? https://mariadb.com/kb/en/mariadb-maxscale-25-mariadb-monitor/#assume_unique_hostnames

Comment by markus makela [ 2021-08-25 ]

wilsonlau any updates?

Comment by Wilson Lau [ 2021-08-26 ]

[monitor]
type=monitor
module=mariadbmon
servers=node1,binlog1,slave1,slave2
user=xxxx
password=xxxx

only use one monitor , set all servers together, then state is right !

Comment by markus makela [ 2021-08-26 ]

So the problem is fixed?

Comment by markus makela [ 2021-09-02 ]

Since this seems to be resolved, I'll close this as Not a Bug.

Generated at Thu Feb 08 04:20:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.