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

Servers lose stale slave status when MaxScale is restarted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4.0
    • Component/s: mariadbmon
    • Labels:
      None

      Description

      The following steps cause all servers that were slaves to receive the wrong status.

      1. Start with one master and at least one slave
      2. Stop the master
      3. Restart MaxScale
      4. The slaves end up in the following state

      ┌─────────┬───────────┬──────┬─────────────┬───────────────────────────────────┬──────────┐
      │ Server  │ Address   │ Port │ Connections │ State                             │ GTID     │
      ├─────────┼───────────┼──────┼─────────────┼───────────────────────────────────┼──────────┤
      │ server1 │ 127.0.0.1 │ 3000 │ 0           │ Down                              │          │
      ├─────────┼───────────┼──────┼─────────────┼───────────────────────────────────┼──────────┤
      │ server2 │ 127.0.0.1 │ 3001 │ 0           │ Slave of External Server, Running │ 0-3000-9 │
      ├─────────┼───────────┼──────┼─────────────┼───────────────────────────────────┼──────────┤
      │ server3 │ 127.0.0.1 │ 3002 │ 0           │ Slave of External Server, Running │ 0-3000-9 │
      ├─────────┼───────────┼──────┼─────────────┼───────────────────────────────────┼──────────┤
      │ server4 │ 127.0.0.1 │ 3003 │ 0           │ Slave of External Server, Running │ 0-3000-9 │
      └─────────┴───────────┴──────┴─────────────┴───────────────────────────────────┴──────────┘
      

      The following messages are logged after MaxScale is restarted.

      2018-07-09 00:15:02   error  : Monitor was unable to connect to server server1[127.0.0.1:3000] : 'Can't connect to MySQL server on '127.0.0.1' (115)'
      2018-07-09 00:15:02   warning: [mariadbmon] 'server2' is a better master candidate than the current master 'server1'. Master will change if 'server1' is no longer a valid master.
      2018-07-09 00:15:02   notice : Server changed state: server1[127.0.0.1:3000]: server_down. [Running] -> [Down]
      2018-07-09 00:15:02   notice : Server changed state: server2[127.0.0.1:3001]: lost_slave. [Slave, Running] -> [Slave of External Server, Running]
      2018-07-09 00:15:02   notice : Server changed state: server3[127.0.0.1:3002]: lost_slave. [Slave, Running] -> [Slave of External Server, Running]
      2018-07-09 00:15:02   notice : Server changed state: server4[127.0.0.1:3003]: lost_slave. [Slave, Running] -> [Slave of External Server, Running]
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            markus makela markus makela
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration