[ERROR] Slave I/O: Replication event checksum Error_code: 1743
[ERROR] Slave I/O: Replication event checksum verification failed while reading from network. Error_code: 1743
的模擬:
目前主從狀態是正常的:
mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.118.161
Master_User: sla
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: bin.000063
Read_Master_Log_Pos: 120
Relay_Log_File: a.000002
Relay_Log_Pos: 277
Relay_Master_Log_File: bin.000063
Slave_IO_Running: Yes
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: 120
Relay_Log_Space: 436
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: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 2
Master_UUID: 69691b70-04e4-11e5-ad6d-000c292f3ddd
Master_Info_File: /var/lib/mysql/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position: 0
1 row in set (0.00 sec)
mysql> stop slave;
Query OK, 0 rows affected (0.01 sec)
mysql> show variables like '%master%';
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| master_info_repository | FILE |
| master_verify_checksum | OFF |
| sync_master_info | 10000 |
+------------------------+-------+
3 rows in set (0.00 sec)
重新啟動主: 或者使用flush logs
主:mysql> show variables like '%master%';
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| master_info_repository | FILE |
| master_verify_checksum | OFF |
| sync_master_info | 10000 |
+------------------------+-------+
3 rows in set (0.00 sec)
mysql> show master status;
+------------+----------+--------------+------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------+----------+--------------+------------------+-------------------+
| bin.000064 | 120 | | | |
+------------+----------+--------------+------------------+-------------------+
1 row in set (0.00 sec)
在主上使用vi 修改bin.000064
mysql> show binlog events in 'bin.000064';
ERROR 1220 (HY000): Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
在從上:
mysql> start slave;
Query OK, 0 rows affected (0.02 sec)
mysql> show slave status \G
*************************** 1. row ***************************
Slave_IO_State:
Master_Host: 192.168.118.161
Master_User: sla
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: bin.000064
Read_Master_Log_Pos: 4
Relay_Log_File: a.000004
Relay_Log_Pos: 161
Relay_Master_Log_File: bin.000064
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: 4
Relay_Log_Space: 477
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: 1595
Last_IO_Error: Relay log write failure: could not queue event from master
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 2
Master_UUID: 69691b70-04e4-11e5-ad6d-000c292f3ddd
Master_Info_File: /var/lib/mysql/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp: 150708 13:34:14
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position: 0
1 row in set (0.00 sec)
從檔案上報出:
2015-07-08 13:34:14 5065 [ERROR] Slave I/O: Replication event checksum verification failed while reading from network. Error_code: 1743
2015-07-08 13:34:14 5065 [ERROR] Slave I/O: Relay log write failure: could not queue event from master, Error_code: 1595
2015-07-08 13:34:14 5065 [Note] Slave I/O thread exiting, read up to log 'bin.000064', position 4
使用mysqlbinlog對主庫上的binlog檔案進行分析
裡面有
ERROR: Error in Log_event::read_log_event(): 'Found invalid event in binary log', data_len: 287, event_type: 0
ERROR: Could not read entry at offset 216: Error in log format or read error.
這個錯誤。
能不能使用binlog得到正確的資料,需要看壞的位置 。一般不要這樣搞
這是由於 binlog檔案壞掉了,所以才有這樣的錯誤,對於主從環境的話, 這時最好還是重建主從。或者從跳過這點,然後使用pt工具進行主從資料的校驗。
轉載請註明源出處
QQ 273002188 歡迎一起學習
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25099483/viewspace-1726895/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- MySQL [ERROR] Slave I/O: Found a Gtid_log_event or Previous_gtids_log_eventMySqlError
- 故障案例:主從同步報錯Fatal error: The slave I/O thread stops because master and slave have equal MySQL server主從同步ErrorthreadASTMySqlServer
- The slave I/O thread stops because master and slave have equal MySQL server UUIDthreadASTMySqlServerUI
- MySQL 5.7從庫報錯exceeds of slave_pending_jobs_size_max. Error_code: 1864MySqlError
- Setup MariaDB Master/Slave Replication for Docker MariaDBASTDocker
- 執行SQL發生錯誤!錯誤:disk I/O errorSQLError
- org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.SQLExceptionErrorWhile
- 計算機I/O與I/O模型計算機模型
- MySQL 5.6複製報錯Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND;MySqlError
- Java I/OJava
- I/O流
- Mysql 建立心跳錶來監控Replication的Slave是否延遲MySql
- throw er; // Unhandled 'error' eventError
- yarn add @fortawesome/Font Awesome-free 之後 報錯 EIO: i/o errorYarnError
- Python教程:精簡概述I/O模型與I/O操作Python模型
- c++ I/OC++
- Java(8)I/OJava
- 關於I/O
- 【java】I/O流Java
- 02. I/O 操作
- Hadoop的I/O操作Hadoop
- NodeJs 非同步 I/ONodeJS非同步
- Java 非同步 I/OJava非同步
- 理解I/O Completion Port
- python 非同步 I/OPython非同步
- JAVA I/O系統Java
- 系統級 I/O
- Google I/O Extend 2018Go
- 網路I/O模型模型
- Error on opening a connection to slave1:33061 on local port: 33061Error
- Linux下的5種I/O模型與3組I/O複用Linux模型
- PBOOTCMS網站程式提示“執行SQL發生錯誤!錯誤:DISK I/O ERROR”boot網站SQLError
- ORACLE OMS啟動失敗之BEA-300040 I/O error while writing node manager statusOracleErrorWhile
- 流?I/O 操作?阻塞?epoll?
- I/O模型、Libuv和Eventloop模型OOP
- 由Nodejs來說I/ONodeJS
- 【面試】I/O 複用面試
- Java™ 教程(命令列I/O)Java命令列
- Linux I/O排程器Linux