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

Maxscale shows replication status as [Slave, Running] even when replication credentials are wrong

    XMLWordPrintable

Details

    • MXS-SPRINT-164

    Description

      Replication on Slave is broken due to wrong password while executing change master to master command ... Still Maxscale shows slave as Slave, Running

      change master to master_host='192.168.47.23', master_user='repuser', master_password='<wrong password>', master_port=3306 , MASTER_USE_GTID=slave_pos;

       
      MariaDB [test]> show slave status\G
      *************************** 1. row ***************************
                      Slave_IO_State: Connecting to master
                         Master_Host: 192.168.47.23
                         Master_User: repuser
                         Master_Port: 3306
                       Connect_Retry: 60
                     Master_Log_File:
                 Read_Master_Log_Pos: 4
                      Relay_Log_File: node_02-relay-bin.000001
                       Relay_Log_Pos: 4
               Relay_Master_Log_File:
                    Slave_IO_Running: Connecting
                   Slave_SQL_Running: Yes
                     Replicate_Do_DB:
                 Replicate_Ignore_DB:
                  Replicate_Do_Table:
              Replicate_Ignore_Table:
             Replicate_Wild_Do_Table:
         Replicate_Wild_Ignore_Table:
                          Last_Errno: 0
                          Last_Error:
                        Skip_Counter: 0
                 Exec_Master_Log_Pos: 4
                     Relay_Log_Space: 256
                     Until_Condition: None
                      Until_Log_File:
                       Until_Log_Pos: 0
                  Master_SSL_Allowed: No
                  Master_SSL_CA_File:
                  Master_SSL_CA_Path:
                     Master_SSL_Cert:
                   Master_SSL_Cipher:
                      Master_SSL_Key:
               Seconds_Behind_Master: NULL
       Master_SSL_Verify_Server_Cert: No
                       Last_IO_Errno: 1045
                       Last_IO_Error: error connecting to master 'repuser@192.168.47.23:3306' - retry-time: 60  maximum-retries: 100000  message: Access denied for user 'repuser'@'192.168.47.24' (using password: YES)
                      Last_SQL_Errno: 0
                      Last_SQL_Error:
         Replicate_Ignore_Server_Ids:
                    Master_Server_Id: 1
                      Master_SSL_Crl:
                  Master_SSL_Crlpath:
                          Using_Gtid: Slave_Pos
                         Gtid_IO_Pos: 1-1-23991
             Replicate_Do_Domain_Ids:
         Replicate_Ignore_Domain_Ids:
                       Parallel_Mode: optimistic
                           SQL_Delay: 0
                 SQL_Remaining_Delay: NULL
             Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
                    Slave_DDL_Groups: 44
      Slave_Non_Transactional_Groups: 0
          Slave_Transactional_Groups: 23988
      1 row in set (0.000 sec)
      
      

      [root@max_02 tmp]# maxctrl list servers
       
      ┌────────┬───────────────┬──────┬─────────────┬─────────────────┬────────────┐
      │ Server │ Address       │ Port │ Connections │ State           │ GTID       │
      ├────────┼───────────────┼──────┼─────────────┼─────────────────┼────────────┤
      │ node1  │ 192.168.47.23 │ 3306 │ 2           │ Master, Running │ 1-1-598192 │
      ├────────┼───────────────┼──────┼─────────────┼─────────────────┼────────────┤
      │ node2  │ 192.168.47.24 │ 3306 │ 0           │ Slave, Running  │ 1-1-23991  │
      └────────┴───────────────┴──────┴─────────────┴─────────────────┴────────────┘
      
      

      Maxscale configuration part :-

       
      [MySQLMonitor]
      type=monitor
      module=mariadbmon
      servers=node1,node2
      user= maxscale
      password= xxxxxxxxx
      replication_user=repuser
      replication_password=xxxxxxxxx
      monitor_interval=5000
      auto_failover=true
      auto_rejoin=true
      enforce_read_only_slaves=1
      backend_connect_timeout=10
      backend_read_timeout=10
      backend_write_timeout=10
      
      

      mariadbmon module may consider below parameter to validate the replication status on slave node.

       
      Slave_IO_Running: Connecting
      Slave_SQL_Running: Yes
      Seconds_Behind_Master: NULL
      Last_IO_Errno: XXXXXX
      Last_IO_Error: error connecting to master 'repuser@192.168.47.XX:3306' - retry-time: 60  maximum-retries: 100000  message: Access denied for user 'repuser'@'192.168.47.YY' (using password: YES)
      
      

      Validated with

      STOP SLAVE IO_THREAD;
      STOP SLAVE SQL_THREAD;
      

      maxctrl list servers output is running as expected , Slave as Running. Only in case of Slave_IO_Running: Connecting , maxctrl list servers shows Slave as Slave, Running

      Attachments

        Issue Links

          Activity

            People

              esa.korhonen Esa Korhonen
              pramod.mahto@mariadb.com Pramod Mahto
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.