复制错误

    错误1:

     Last_IO_Errno: 1159 (ER_NET_READ_INTERRUPTED)

     Last_IO_Error: The slave I/O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master. Error: 

     错误2:     

    Last_IO_Errno: 1593 (ER_SLAVE_FATAL_ERROR)

    Last_IO_Error: The slave I/O thread stops because SET @master_heartbeat_period on master failed. Error: 

 

分析

 1 首先从告警信息,同一主机出现大量实例的复制错误。首先可以排出是mysql问题。应该是外部环境导致,例如网络,硬件故障等。

 2 错误1159即ER_NET_READ_INTERRUPTED网络中断,由此可以推断是网络问题导致

 3 从错误信息中,Last_IO_Error: The slave I/O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master。定位源码可看到,IO thread每次启动io_thread从主库拉binlog是都有以下逻辑,(handle_slave_io-> get_master_version_and_clock)检查serverid是否重复,时间钟,时区,字符集,设置master heartbeat等. 此错误是在检查serverid时发生网路中断所致。

  类似的错误还有:

   Get master TIME_ZONE failed with error:xxx

 

处理方法

    stop slave;start slave; 即可恢复 

 

相关文章:

  • 2022-12-23
  • 2021-09-30
  • 2021-11-18
  • 2022-01-24
  • 2021-08-13
  • 2022-12-23
猜你喜欢
  • 2021-12-18
  • 2022-12-23
  • 2021-04-19
  • 2021-11-14
  • 2021-10-09
  • 2021-10-09
相关资源
相似解决方案