Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-1272

MySQL Monitor with a Replication Cluster using MariaDB 5.1 does not report correctly Master details

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.1.3
    • Fix Version/s: N/A
    • Component/s: mariadbmon
    • Labels:
      None
    • Environment:
      CentOS 7.3

      Description

      as a follow up to MXS-1244, same setup.

      I have updated to MaxScale 2.1.3 GA and the MySQL Monitor does not report correctly the Replication Cluster Master details:

      • Master ID
      • Master binlog file
      • Master binlog position

      # maxadmin
      MaxScale> show version
      2.1.3
      MaxScale> list monitors
      ---------------------+---------------------
      Monitor              | Status
      ---------------------+---------------------
      MySQL Monitor        | Running
      ---------------------+---------------------
      MaxScale> list services
      Services.
      --------------------------+-------------------+--------+----------------+-------------------
      Service Name              | Router Module     | #Users | Total Sessions | Backend databases
      --------------------------+-------------------+--------+----------------+-------------------
      MaxAdmin                  | cli               |      2 |              3 | 
      ReadConnRouter_Slave      | readconnroute     |      1 |              1 | server2, server3
      ReadConnRouter_Master     | readconnroute     |      1 |              1 | server1
      RWRC                      | readwritesplit    |      1 |              1 | server1, server2, server3
      --------------------------+-------------------+--------+----------------+-------------------
       
      MaxScale> list servers
      Servers.
      -------------------+-----------------+-------+-------------+--------------------
      Server             | Address         | Port  | Connections | Status              
      -------------------+-----------------+-------+-------------+--------------------
      server1            | 10.10.81.191    |  3306 |           0 | Slave, Running
      server2            | 10.10.81.192    |  3306 |           0 | Master, Running
      server3            | 10.10.81.193    |  3306 |           0 | Slave, Running
      -------------------+-----------------+-------+-------------+--------------------
      MaxScale> show monitor "MySQL Monitor"
      Monitor:           0x8ce1e0
      Name:              MySQL Monitor
      State:             Running
      Sampling interval: 1000 milliseconds
      Connect Timeout:   3 seconds
      Read Timeout:      1 seconds
      Write Timeout:     2 seconds
      Monitored servers: [10.10.81.191]:3306, [10.10.81.192]:3306, [10.10.81.193]:3306
      MaxScale MonitorId:	0
      Replication lag:	enabled
      Detect Stale Master:	enabled
      Server information
       
      Server: server1
      Server ID: 191
      Read only: ON
      Slave configured: YES
      Slave IO running: YES
      Slave SQL running: YES
      Master ID: -1
      Master binlog file: 970659590
      Master binlog position: 0
       
      Server: server2
      Server ID: 192
      Read only: OFF
      Slave configured: NO
      Slave IO running: NO
      Slave SQL running: NO
      Master ID: -1
      Master binlog file: 
      Master binlog position: 0
       
      Server: server3
      Server ID: 193
      Read only: ON
      Slave configured: YES
      Slave IO running: YES
      Slave SQL running: YES
      Master ID: -1
      Master binlog file: 970659590
      Master binlog position: 0
       
       
      MaxScale> show services
      	Service:                             MaxAdmin
      	Router:                              cli
      	State:                               Started
      	Started:                             Tue May 23 06:45:48 2017
      	Root user access:                    Disabled
      	Backend databases:
      	Total connections:                   3
      	Currently connected:                 2
      	Service:                             ReadConnRouter_Slave
      	Router:                              readconnroute
      	State:                               Started
      	Number of router sessions:   	0
      	Current no. of router sessions:	1
      	Number of queries forwarded:   	0
      	Started:                             Tue May 23 06:45:48 2017
      	Root user access:                    Disabled
      	Backend databases:
      		[10.10.81.192]:3306    Protocol: MySQLBackend    Name: server2
      		[10.10.81.193]:3306    Protocol: MySQLBackend    Name: server3
      	Total connections:                   1
      	Currently connected:                 1
      	Service:                             ReadConnRouter_Master
      	Router:                              readconnroute
      	State:                               Started
      	Number of router sessions:   	0
      	Current no. of router sessions:	1
      	Number of queries forwarded:   	0
      	Started:                             Tue May 23 06:45:48 2017
      	Root user access:                    Disabled
      	Backend databases:
      		[10.10.81.191]:3306    Protocol: MySQLBackend    Name: server1
      	Total connections:                   1
      	Currently connected:                 1
      	Service:                             RWRC
      	Router:                              readwritesplit
      	State:                               Started
       
      	use_sql_variables_in:      all
      	slave_selection_criteria:  LEAST_CURRENT_OPERATIONS
      	master_failure_mode:       fail_instantly
      	max_slave_replication_lag: -1
      	retry_failed_reads:        true
      	strict_multi_stmt:         false
      	disable_sescmd_history:    true
      	max_sescmd_history:        0
      	master_accept_reads:       false
       
      	Number of router sessions:           	0
      	Current no. of router sessions:      	1
      	Number of queries forwarded:          	0
      	Number of queries forwarded to master:	0 (0.00%)
      	Number of queries forwarded to slave: 	0 (0.00%)
      	Number of queries forwarded to all:   	0 (0.00%)
      	Connection distribution based on myweight server parameter.
      		Server               Target %    Connections  Operations
      		                               Global  Router
      		server1              33.3%     0       0       0
      		server2              33.3%     0       0       0
      		server3              33.3%     0       0       0
      	Started:                             Tue May 23 06:45:48 2017
      	Root user access:                    Disabled
      	Backend databases:
      		[10.10.81.191]:3306    Protocol: MySQLBackend    Name: server1
      		[10.10.81.192]:3306    Protocol: MySQLBackend    Name: server2
      		[10.10.81.193]:3306    Protocol: MySQLBackend    Name: server3
      	Routing weight parameter:            myweight
      	Total connections:                   1
      	Currently connected:                 1
      MaxScale> show servers
      Server 0x8c9790 (server1)
      	Server:                              10.10.81.191
      	Status:                              Slave, Running
      	Protocol:                            MySQLBackend
      	Port:                                3306
      	Server Version:                      5.1.62-MariaDB-mariadb115-log
      	Node Id:                             191
      	Master Id:                           192
      	Slave Ids:                           
      	Repl Depth:                          1
      	Slave delay:                         0
      	Last Repl Heartbeat:                 Tue May 23 07:43:31 2017
      	Server Parameters:
      	                                       myweight	100
      	Number of connections:               0
      	Current no. of conns:                0
      	Current no. of operations:           0
      Server 0x8c89d0 (server2)
      	Server:                              10.10.81.192
      	Status:                              Master, Running
      	Protocol:                            MySQLBackend
      	Port:                                3306
      	Server Version:                      5.1.62-MariaDB-mariadb115-log
      	Node Id:                             192
      	Master Id:                           -1
      	Slave Ids:                           193, 191 
      	Repl Depth:                          0
      	Last Repl Heartbeat:                 Tue May 23 07:43:31 2017
      	Server Parameters:
      	                                       myweight	100
      	Number of connections:               0
      	Current no. of conns:                0
      	Current no. of operations:           0
      Server 0x8c7c10 (server3)
      	Server:                              10.10.81.193
      	Status:                              Slave, Running
      	Protocol:                            MySQLBackend
      	Port:                                3306
      	Server Version:                      5.1.62-MariaDB-mariadb115-log
      	Node Id:                             193
      	Master Id:                           192
      	Slave Ids:                           
      	Repl Depth:                          1
      	Slave delay:                         0
      	Last Repl Heartbeat:                 Tue May 23 07:43:31 2017
      	Server Parameters:
      	                                       myweight	100
      	Number of connections:               0
      	Current no. of conns:                0
      	Current no. of operations:           0
      

      monitor for server1 and server3 (current slaves) reports:

      • Master ID: -1
      • Master binlog file: 970659590
      • Master binlog position: 0

      it should instead report:

      • Master ID: 192
      • Master binlog file: db-bin.000008
      • Master binlog position: 970659590

      monitor for server2 (the current master) should report:

      • Master ID: -1
      • Master binlog file: db-bin.000008
      • Master binlog position: 970659590

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              abarbieri Andrea Barbieri
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: