Client requested Master to start replication from impossible position; The last event is read from

Source: Internet
Author: User
One: Problem description

Because the 10.0.3.96 of the virtual machine is not stored enough, the database above is inaccessible. Later, when 10.0.3.96 was able to access it, the exception occurred from the library 10.0.3.97:

Mysql> show slave status \g; 1.
                  Row *************************** slave_io_state:master_host:10.0.3.96 Master_user:admin master_port:3306 connect_retry:60 master_log_file:m
                ysql-bin.000417 read_master_log_pos:228308262 relay_log_file:vhost_eip_26-relay-bin.001024
            relay_log_pos:228308408 relay_master_log_file:mysql-bin.000417 Slave_io_running:no Slave_sql_running:yes Replicate_Do_DB:Replicate_Ignore_DB:Replicate_Do_Ta Ble:replicate_ignore_table:replicate_wild_do_table:replicate_wild_ignore_table:l
              ast_errno:0 last_error:skip_counter:0 exec_master_log_pos:228308262
         relay_log_space:228308614 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:1236  Last_io_error:got fatal Error 1236 from master while reading data from binary log: ' Client requested Master to start Replication from impossible position; The last event is read from './mysql-bin.000417 ' in 228308262, the last byte read is read from './mysql-bin.000417 ' at 4
               .' last_sql_errno:0 last_sql_error:replicate_ignore_server_ids:master_server_id:1 1 Row i
 N Set (0.01 sec) error:no query specified
After viewing, the last position of the Binlog file is 228287326, no 228308262 this location:
# at 228287326
#170223  3:25:08 server ID 1  end_log_pos 228287353     Xid = 1951871937 commit/*!*/
;
DELIMITER;
# End of log file
ROLLBACK/* Added by Mysqlbinlog * *;
/*!50003 SET completion_type= @OLD_COMPLETION_TYPE * *;

II: Solutions

Start copying from the beginning of the next file mysql-bin.000418.

mysql> stop Slave; Query OK, 0 rows Affected (0.00 sec) mysql> Change MASTER to Master_host = ' 10.0.3.96 ', master_log_file = ' mysql-bin.0004
', Master_log_pos = 4;
Query OK, 0 rows affected (0.25 sec) mysql> start slave;
Query OK, 0 rows Affected (0.00 sec) mysql> Show slave status \g; 1. Row *************************** slave_io_state:waiting for master to send event Master_h
              ost:10.0.3.96 master_user:admin master_port:3306 connect_retry:60 master_log_file:mysql-bin.000418 read_master_log_pos:107 Relay_log_file:vhost_ei p_26-relay-bin.000002 relay_log_pos:253 relay_master_log_file:mysql-bin.000418 Slav 
           E_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_er
              ror:skip_counter:0 exec_master_log_pos:107 relay_log_space:416
           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_Cip her:master_ssl_key:seconds_behind_master:0 Master_ssl_verify_server_cert:no L ast_io_errno:0 last_io_error:last_sql_errno:0 Last_sql_error:replica
 Te_ignore_server_ids:master_server_id:1 1 row in Set (0.00 sec) Error:no query specified

--This article references from: http://blog.chinaunix.net/uid-26446098-id-3310546.html


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.