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

Maxscale unable to enforce round-robin between read service for Slave

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2, 2.2.3
    • Fix Version/s: 2.2.9
    • Component/s: readconnroute
    • Labels:
      None
    • Environment:
      CentOS , MaxScale

      Description

      With the router_options set to slave,master , accessing node gives an error below "MySQL server has gone away" [Master & Slave node are up and running].

       
      [root@maxscale ~]# maxadmin
      MaxScale> list servers
      Servers.
      -------------------+-----------------+-------+-------------+--------------------
      Server             | Address         | Port  | Connections | Status
      -------------------+-----------------+-------+-------------+--------------------
      master-node        | 192.168.207.207 |  3306 |           0 | Master, Running
      slave-node         | 192.168.207.206 |  3306 |           0 | Slave, Running
      -------------------+-----------------+-------+-------------+--------------------
      MaxScale>
       
       
      [root@maxscale ~]# mysql -u maxmon -pmaxmon  -h 192.168.207.158 -e "select @@hostname" --port=3399
      ERROR 2006 (HY000) at line 1: MySQL server has gone away
      

      If Slave-node is stop (Service mysql stop) then all read queries are directing to the master-node.

       
      [root@maxscale ~]# maxadmin
      MaxScale> list servers
      Servers.
      -------------------+-----------------+-------+-------------+--------------------
      Server             | Address         | Port  | Connections | Status
      -------------------+-----------------+-------+-------------+--------------------
      master-node        | 192.168.207.207 |  3306 |           0 | Master, Running
      slave-node         | 192.168.207.206 |  3306 |           0 | Down
      -------------------+-----------------+-------+-------------+--------------------
       
       
      [root@maxscale ~]#  mysql -u maxmon -pmaxmon  -h 192.168.207.158 -e "select @@hostname" --port=3399
      +-------------+
      | @@hostname  |
      +-------------+
      | master-node |
      +-------------+
      

      When we remove the slave option from the router_options i.e router_options=master then it only goes to the Master (Which is as expected )

       
      MaxScale> list servers
      Servers.
      -------------------+-----------------+-------+-------------+--------------------
      Server             | Address         | Port  | Connections | Status
      -------------------+-----------------+-------+-------------+--------------------
      master-node        | 192.168.207.207 |  3306 |           0 | Master, Running
      slave-node         | 192.168.207.206 |  3306 |           0 | Slave, Running
      -------------------+-----------------+-------+-------------+--------------------
       
      [root@maxscale ~]#  mysql -u maxmon -pmaxmon  -h 192.168.207.158 -e "select @@hostname" --port=3399
      +-------------+
      | @@hostname  |
      +-------------+
      | master-node |
      +-------------+
      

      When we remove the master option from the router_options i.e router_options=slave then it only goes to the Slave (Which is as expected )

       
      [root@maxscale ~]# maxadmin
      MaxScale> list servers
      Servers.
      -------------------+-----------------+-------+-------------+--------------------
      Server             | Address         | Port  | Connections | Status
      -------------------+-----------------+-------+-------------+--------------------
      master-node        | 192.168.207.207 |  3306 |           0 | Master, Running
      slave-node         | 192.168.207.206 |  3306 |           0 | Slave, Running
      -------------------+-----------------+-------+-------------+--------------------
       
       
      [root@maxscale ~]# mysql -u maxmon -pmaxmon  -h 192.168.207.158 -e "select @@hostname" --port=3399
      +------------+
      | @@hostname |
      +------------+
      | slave-node |
      +------------+
      

      Is there a way that will enforce a round-robin between Master-node and Slave-Node?

       

        Attachments

          Activity

            People

            Assignee:
            markus makela markus makela
            Reporter:
            pramod.mahto@mariadb.com Pramod Mahto
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: