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

Mariadbmon switchover and master_ssl

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.2.13
    • 2.3.6
    • mariadbmon
    • None
    • Debian GNU/Linux 9.3 (stretch)
      MaxScale 2.2.13

    Description

      Hi!

      Mariadbmon module have to operate with parameter MASTER_SSL when does swichover.
      For now it doesn't use use it.

      From maxscale.cnf:

      [dbbox1]
      type=server
      address=10.8.99.201
      port=3306
      protocol=MariaDBBackend
      ssl=required
      ssl_key=/etc/mysql/cert/client-key.pem
      ssl_cert=/etc/mysql/cert/client-cert.pem
      ssl_ca_cert=/etc/mysql/cert/ca.pem
       
      [dbbox2]
      type=server
      address=10.8.99.202
      port=3306
      protocol=MariaDBBackend
      ssl=required
      ssl_key=/etc/mysql/cert/client-key.pem
      ssl_cert=/etc/mysql/cert/client-cert.pem
      ssl_ca_cert=/etc/mysql/cert/ca.pem
       
      [cluster]
      type=monitor
      module=mariadbmon
      servers=dbbox1,dbbox2
      user=mon
      passwd=mon
      monitor_interval=2000
      detect_replication_lag=true
      replication_user=rpl
      replication_password=rpl
      

      User permission:

      MariaDB [(none)]> show grants for rpl@'%'\G;
      *************************** 1. row ***************************
      Grants for rpl@%: GRANT REPLICATION SLAVE ON *.* TO 'rpl'@'%' IDENTIFIED BY PASSWORD '*624459C87E534A126498ADE1B12E0C66EDA035A3' REQUIRE SSL
      1 row in set (0.00 sec)
      

      Command:
      maxadmin call command mariadbmon switchover cluster dbbox2

      MaxScale logs:
      2018-08-17 10:35:11 info : (5) [cli] MaxAdmin: call command "mariadbmon" "switchover" "cluster" "dbbox2"
      2018-08-17 10:35:11 notice : (5) [mariadbmon] Stopped the monitor cluster for the duration of switchover.
      2018-08-17 10:35:11 notice : (5) [mariadbmon] Demoting server 'dbbox1'.
      2018-08-17 10:35:11 notice : (5) [mariadbmon] Promoting server 'dbbox2' to master.
      2018-08-17 10:35:12 notice : (5) [mariadbmon] Old master 'dbbox1' starting replication from 'dbbox2'.
      2018-08-17 10:35:12 notice : (5) [mariadbmon] Redirecting slaves to new master.
      2018-08-17 10:35:12 warning: (5) [mariadbmon] Slave 'dbbox1' cannot start replication: 'error connecting to master 'rpl@10.8.99.202:3306' - retry-time: 60 maximum-retries: 86400 message: Access denied for user 'rpl'@'10.8.99.201' (using password: YES)'.
      2018-08-17 10:35:12 warning: (5) [mariadbmon] Replication from the new master could not be confirmed for 1 slaves. 1 encountered an I/O or SQL error, 0 failed to reply and 0 did not advance in Gtid until time ran out.
      2018-08-17 10:35:12 error : (5) [mariadbmon] Switchover dbbox1 -> dbbox2 failed.
      2018-08-17 10:35:12 notice : Loaded server states from journal file: /var/lib/maxscale/cluster/monitor.dat
      2018-08-17 10:35:12 info : Stopped MaxAdmin-Service client session [5]
      2018-08-17 10:35:12 notice : Server changed state: dbbox1[10.8.99.201:3306]: lost_master. [Master, Running] -> [Running]
      2018-08-17 10:35:12 error : [mariadbmon] No Master can be determined. Last known was 10.8.99.201:3306

      Attachments

        Activity

          People

            esa.korhonen Esa Korhonen
            vikan Vi Kan
            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.