Getting "[ERROR] Read semi-sync reply magic number error" errors when slave_compressed_protocol=1

Bug #1671356 reported by Jaime Sicam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
New
Undecided
Unassigned
5.6
New
Undecided
Unassigned
5.7
Triaged
Medium
Unassigned

Bug Description

Repeated error messages on master:
2017-03-09T06:03:05.736142Z 33 [Note] Start binlog_dump to master_thread_id(33) slave_server(101), pos(mysql-bin.000003, 55744206)
2017-03-09T06:03:05.736360Z 32 [Note] Stop semi-sync binlog_dump to slave (server_id: 101)
2017-03-09T06:03:06.736172Z 33 [Note] Start semi-sync binlog_dump to slave (server_id: 101), pos(mysql-bin.000003, 55744206)
2017-03-09T06:03:06.796895Z 0 [ERROR] Read semi-sync reply magic number error
2017-03-09T06:03:06.797982Z 0 [ERROR] /home/drake/binaries_stock/5.7.15/bin/mysqld: Got timeout reading communication packets
2017-03-09T06:03:06.836233Z 0 [ERROR] /home/drake/binaries_stock/5.7.15/bin/mysqld: Got an error reading communication packets
2017-03-09T06:03:06.837107Z 33 [Note] Stop semi-sync binlog_dump to slave (server_id: 101)
2017-03-09T06:03:06.837614Z 34 [Note] While initializing dump thread for slave with UUID <00019791-2222-2222-2222-222222222222>, found a zombie dump thread with the same UUID. Master is killing the zombie dump thread(33).
2017-03-09T06:03:06.837648Z 34 [Note] Start binlog_dump to master_thread_id(34) slave_server(101), pos(mysql-bin.000003, 57622446)
2017-03-09T06:03:07.837293Z 34 [Note] Start semi-sync binlog_dump to slave (server_id: 101), pos(mysql-bin.000003, 57622446)
2017-03-09T06:03:07.907752Z 0 [ERROR] Read semi-sync reply magic number error
2017-03-09T06:03:07.908827Z 0 [ERROR] /home/drake/binaries_stock/5.7.15/bin/mysqld: Got timeout reading communication packets
2017-03-09T06:03:07.929182Z 0 [ERROR] /home/drake/binaries_stock/5.7.15/bin/mysqld: Got an error reading communication packets
2017-03-09T06:03:07.930163Z 35 [Note] While initializing dump thread for slave with UUID <00019791-2222-2222-2222-222222222222>, found a zombie dump thread with the same UUID. Master is killing the zombie dump thread(34).

Repeated error messages on slave:
2017-03-09T06:03:06.836081Z 1 [ERROR] Error reading packet from server for channel '': Lost connection to MySQL server during query (server_errno=2013)
2017-03-09T06:03:06.836101Z 1 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000003' at position 57622446 for channel ''
2017-03-09T06:03:06.836110Z 1 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
2017-03-09T06:03:07.929185Z 1 [ERROR] Error reading packet from server for channel '': Lost connection to MySQL server during query (server_errno=2013)
2017-03-09T06:03:07.929204Z 1 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000003' at position 59500731 for channel ''
2017-03-09T06:03:07.929213Z 1 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
2017-03-09T06:03:09.075862Z 1 [ERROR] Error reading packet from server for channel '': Lost connection to MySQL server during query (server_errno=2013)
2017-03-09T06:03:09.075879Z 1 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000003' at position 61379031 for channel ''
2017-03-09T06:03:09.075887Z 1 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.

To reproduce via mysql sandbox:
1. Setup replication:
make_replication_sandbox 5.7.15

2. Enable semisync replication on master:
INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master.so';

3. Enable semisync replication on slave:
INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave.so';

4. Edit master my.cnf and add [mysqld] section:
slave_compressed_protocol = 1
rpl_semi_sync_master_enabled=1
rpl_semi_sync_master_timeout=1000

5. Edit slave my.cnf and add [mysqld] section:
slave_compressed_protocol=1
rpl_semi_sync_slave_enabled=1

6. Restart Master and Slave
./restart_all

7. Import data on Master:
mysql -u root < employees.sql

8. Review error logs on master and slave

Solution: Disable slave_compressed_protocol on slave:
STOP SLAVE;
SET GLOBAL slave_compressed_protocol=0;
START SLAVE;

Jaime Sicam (jssicam)
Changed in percona-server:
status: New → Confirmed
tags: added: upstreamr
tags: added: upstream
removed: upstreamr
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1791

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.