2013년 11월 7일 목요일

MySQL error 1236: Client requested master to start replication from impossible position

원인 (cause)
===========
I/O 부하 / 등 여러가지 이유로 인해 Master / Slave 의 Replication이 깨진 상황.
( Client requested master to start replication from impossible position )

현황(status)
===========
mysql>show master status;
localhost-bin.000001 = 400

mysql>show slave status;
localhost-bin.000001 = 100

mysql log
=========
131104 16:16:57 [Note] Slave I/O thread: connected to master 'replicator@121.78.118.224:3306',replication started in log 'localhost-bin.000001' at position 20031086
131104 23:05:39 [ERROR] Error reading packet from server: error reading log entry ( server_errno=1236)
131104 23:05:39 [ERROR] Got fatal error 1236: 'error reading log entry' from master when reading data from binary log
131104 23:05:39 [Note] Slave I/O thread exiting, read up to log 'localhost-bin.000001', position 22002773


결과
===========
Salve 서버의 로그 포지션을 마스터와 일치하게 한 후, Slave 다시 시작.

STOP SLAVE;
CHANGE MASTER TO MASTER_LOG_POS = 0;
CHANGE MASTER TO MASTER_LOG_FILE = 'mysql-bin.000014';
START SLAVE;

댓글 없음: