简体   繁体   English

MariaDB + MaxScale复制错误:从属I / O线程停止,因为在尝试选择@master_binlog_checksum时遇到致命错误

[英]MariaDB + MaxScale Replication Error : The slave I/O thread stops because a fatal error is encountered when it tried to SELECT @master_binlog_checksum

I am trying to setup Real-time Data Streaming to Kafka with MaxScale CDC with MariaDB veriosn 10.0.32. 我正在尝试使用带有MariaDB veriosn 10.0.32的MaxScale CDC设置到Kafka的实时数据流。 After configuring replication, I am getting the status: 配置复制后,我得到以下状态:

"The slave I/O thread stops because a fatal error is encountered when it tried to SELECT @master_binlog_checksum". “从属I / O线程停止,因为在尝试选择@master_binlog_checksum时遇到致命错误”。

Below are all of my configurations: 以下是我的所有配置:

MariaDB - Configuration MariaDB-配置

server-id               = 1
#report_host            = master1
#auto_increment_increment = 2
#auto_increment_offset  = 1
log_bin                 = /var/log/mysql/mariadb-bin
log_bin_index           = /var/log/mysql/mariadb-bin.index
binlog_format           = row
binlog_row_image        = full
# not fab for performance, but safer
#sync_binlog            = 1
expire_logs_days        = 10
max_binlog_size         = 100M
# slaves
#relay_log              = /var/log/mysql/relay-bin
#relay_log_index        = /var/log/mysql/relay-bin.index
#relay_log_info_file    = /var/log/mysql/relay-bin.info
#log_slave_updates
#read_only

MaxScale Configuration MaxScale配置

[server1]
type=server
address=192.168.56.102
port=3306
protocol=MariaDBBackend

[Replication]
type=service
router=binlogrouter
version_string=10.0.27-log
user=myuser
passwd=mypwd
server_id=3
#binlogdir=/var/lib/maxscale
#mariadb10-compatibility=1
router_options=binlogdir=/var/lib/maxscale,mariadb10-compatibility=1
#slave_sql_verify_checksum=1

[Replication Listener]
type=listener
service=Replication
protocol=MySQLClient
port=5308

Starting Replication 开始复制

CHANGE MASTER TO MASTER_HOST='192.168.56.102', MASTER_PORT=5308, MASTER_USER='myuser', MASTER_PASSWORD='mypwd', MASTER_LOG_POS=328, MASTER_LOG_FILE='mariadb-bin.000018';
START SLAVE;

Replication Status 复制状态

                  Master_Host: 192.168.56.102
                  Master_User: myuser
                  Master_Port: 5308
                Connect_Retry: 60
              Master_Log_File: mariadb-bin.000018
          Read_Master_Log_Pos: 328
               Relay_Log_File: mysqld-relay-bin.000002
                Relay_Log_Pos: 4
        Relay_Master_Log_File: mariadb-bin.000018
             **Slave_IO_Running: No**
            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: 328
              Relay_Log_Space: 248
              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: 1593
                Last_IO_Error: **The slave I/O thread stops because a fatal error is encountered when it tried to SELECT @master_binlog_checksum. Error:**
               Last_SQL_Errno: 0
               Last_SQL_Error:
  Replicate_Ignore_Server_Ids:
             Master_Server_Id: 0
               Master_SSL_Crl:
           Master_SSL_Crlpath:
                   Using_Gtid: No
                  Gtid_IO_Pos:

The binlogrouter performs the following query to set the value of @master_binlog_checksum (real replication slaves perform the same query). binlogrouter执行以下查询以设置@master_binlog_checksum的值(实际复制从属执行相同的查询)。

SET @master_binlog_checksum = @@global.binlog_checksum

Checking what the output of it is will probably explain why the replication won't start. 检查它的输出可能会解释为什么复制不会开始。 Most likely the SET query failed which is why the latter SELECT @master_binlog_checksum query returns unexpected results. SET查询很可能失败,这就是为什么后面的SELECT @master_binlog_checksum查询返回意外结果的原因。


In cases like these, it is recommended to open a bug report on the MariaDB Jira under the MaxScale project . 在这种情况下,建议在MaxScale项目下打开MariaDB Jira的错误报告。 This way the possibility of a bug is ruled out and if it turns out to be a configuration problem, the documentation can be updated to more clearly explain how to configure MaxScale. 这样就排除了可能的错误,如果事实证明是配置问题,则可以更新文档以更清楚地说明如何配置MaxScale。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Mariadb 主从复制 SSL 错误 - Mariadb Master - Slave replication SSL Error MariaDB主从复制无法正常运行 - MariaDB Master-Slave replication don't work without error Mariadb 主从复制 - 可以将 binlog-ignore-db 添加到现有设置中吗? - Mariadb master-slave replication - can binlog-ignore-db be added to an existing setup? 如何使用一个主 mariadb 服务器和 3 个从属 mariadb 服务器配置 maxscale? - how can I configure maxscale with one master mariadb server, 3 slave mariadb server? Maxscale使用router_options = master(slave / master replication)写入slave,并且侦听器已停止 - Maxscale is writing on slave with router_options=master (slave/master replication) and listeners stopped 设置对mariaDB的复制/主从配置 - Setting Up Replication / master slave configuration to mariaDB MariaDB主-主和主-从复制同时 - MariaDB master-master and master-slave replication at the same time MariaDB从站错误-字符串对于MASTER_HOST来说太长 - MariaDB Slave Error - String is too long for MASTER_HOST 如何修复MariaDB中的多主复制错误 - How to fix Multi-Master Replication Error in MariaDB MariaDB复制从站到主服务器连接的权限被拒绝 - Permission Denied on MariaDB Replication Slave to Master Server connection
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM