zoukankan      html  css  js  c++  java
  • mysql 主从错误

    复制错误

        错误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; 即可恢复 

  • 相关阅读:
    Maven导包失败三种解决方案-Could not transfer artifact
    MySQL远程登录赋权操作各命令的意思
    大数据技术与应用课堂测试01
    软件体系架构课堂测试01
    设计模式复习笔记23
    设计模式复习笔记22
    设计模式复习笔记21
    设计模式复习笔记20
    设计模式复习笔记19
    设计模式复习笔记18
  • 原文地址:https://www.cnblogs.com/mikeluwen/p/7516009.html
Copyright © 2011-2022 走看看