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

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 2.2, 2.2.3
    • 2.2.9
    • readconnroute
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.