查看: 4420|回复: 5

[原创] 这是bug吗?

[复制链接]
论坛徽章:
9
蛋疼蛋
日期:2011-10-18 11:00:17ITPUB十周年纪念徽章
日期:2011-11-01 16:25:51蜘蛛蛋
日期:2011-11-09 13:48:06迷宫蛋
日期:2011-11-24 10:38:342012新春纪念徽章
日期:2012-01-04 11:56:44蜘蛛蛋
日期:2013-07-12 21:52:36凯迪拉克
日期:2013-12-12 09:53:072014年新春福章
日期:2014-02-18 16:44:08马上有对象
日期:2014-02-18 16:44:08
跳转到指定楼层
1#
发表于 2011-10-31 10:19 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
mm配置 ,配置如下
主1:
[root@BJ-ROLEDB-JY data]# uname -a
Linux BJ-ROLEDB-JY 2.6.18-194.32.1.el5 #1 SMP Wed Jan 5 17:52:25 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
主2:
[root@BJ-ROLEDB-JY-SLAVE ~]# uname -a
Linux BJ-ROLEDB-JY-SLAVE 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
主1接应用,主2,做standby
Server version:         5.5.15-log Source distribution
主1的error log:
111029  0:44:23 [Note] Start binlog_dump to slave_server(7), pos(mysql-bin.000594, 44631974)
111029 12:30:40 [Note] Start binlog_dump to slave_server(7), pos(mysql-bin.000617, 11863737)
111029 12:40:44 [Note] Start binlog_dump to slave_server(7), pos(mysql-bin.000617, 11863828)
111029 12:46:45 [Note] Start binlog_dump to slave_server(7), pos(mysql-bin.000617, 11863828)
111029 12:52:46 [Note] Start binlog_dump to slave_server(7), pos(mysql-bin.000617, 11863828)
111029 12:58:50 [Note] Start binlog_dump to slave_server(7), pos(mysql-bin.000617, 11863828)
111029 13:04:53 [Note] Start binlog_dump to slave_server(7), pos(mysql-bin.000617, 11863828)
111029 13:10:57 [Note] Start binlog_dump to slave_server(7), pos(mysql-bin.000617, 11863828)
111029 13:20:43 [Note] Start binlog_dump to slave_server(7), pos(mysql-bin.000617, 11863828)
111030 16:06:59 [Note] Start binlog_dump to slave_server(7), pos(mysql-bin.000673, 98153952)

主2的error log:
111029  0:41:36 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
111029  0:41:36 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000594' at position 44631974
111029 12:27:52 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
111029 12:27:52 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000617' at position 11863737
111029 12:37:53 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
111029 12:37:53 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000617' at position 11863828
111029 12:42:57 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
111029 12:43:57 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000617' at position 11863828
111029 12:48:58 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
111029 12:49:58 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000617' at position 11863828
111029 12:54:59 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
111029 12:55:59 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000617' at position 11863828
111029 13:01:03 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
111029 13:02:03 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000617' at position 11863828
111029 13:07:06 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
111029 13:08:06 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000617' at position 11863828
111029 13:16:55 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
111029 13:17:55 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000617' at position 11863828
111029 14:13:38 [Note] Start binlog_dump to slave_server(1), pos(mysql-bin.000001, 5035927)
111030 16:04:10 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
111030 16:04:10 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000673' at position 98153952

我在两边show slave status都正常。
mysql> show slave status\G
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: 116.213.130.171
                  Master_User: rep
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000699
          Read_Master_Log_Pos: 76440653
               Relay_Log_File: mysqld-relay-bin.002097
                Relay_Log_Pos: 76440799
        Relay_Master_Log_File: mysql-bin.000699
             Slave_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_Error:
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 76440653
              Relay_Log_Space: 181298831
              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: 0
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error:
               Last_SQL_Errno: 0
               Last_SQL_Error:
  Replicate_Ignore_Server_Ids:
             Master_Server_Id: 1
1 row in set (0.00 sec)
然后mysqlbinlog有错误的位置:
[root@BJ-ROLEDB-JY data]# mysqlbinlog mysql-bin.000617 --start-position=11863737 --stop-position=11863828
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#111029 12:19:57 server id 1  end_log_pos 107   Start: binlog v 4, server v 5.5.15-log created 111029 12:19:57
BINLOG '
7X6rTg8BAAAAZwAAAGsAAAAAAAQANS41LjE1LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA==
'/*!*/;
# at 11863737
#111029 12:24:05 server id 1  end_log_pos 11863828      Query   thread_id=543   exec_time=0     error_code=0
SET TIMESTAMP=1319862245/*!*/;
SET @@session.pseudo_thread_id=543/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=2097152/*!*/;
SET @@session.auto_increment_increment=2, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=33/*!*/;
SET @@session.time_zone='SYSTEM'/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
BEGIN
/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;

在另外一台测试机子上应用:
mysql> source b
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Charset changed
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
没问题。
请问大大们,这个是bug吗?
三思老大的blog里面有一篇也是有关server_errno=2013的文章,但是他那个场景是断电发生的,我这个是在一切运行ok的情况下产生的,而且还没有一点副作用,请问这是神马情况?求解
论坛徽章:
10
2011新春纪念徽章
日期:2011-02-18 11:43:362013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:08:15双黄蛋
日期:2012-04-18 13:03:23蛋疼蛋
日期:2012-02-14 09:01:14复活蛋
日期:2012-02-01 10:04:16双黄蛋
日期:2012-01-16 14:47:262012新春纪念徽章
日期:2012-01-04 11:53:29ITPUB十周年纪念徽章
日期:2011-11-01 16:23:26优秀写手
日期:2013-12-18 09:29:12
2#
发表于 2011-10-31 10:28 | 只看该作者

使用道具 举报

回复
论坛徽章:
9
蛋疼蛋
日期:2011-10-18 11:00:17ITPUB十周年纪念徽章
日期:2011-11-01 16:25:51蜘蛛蛋
日期:2011-11-09 13:48:06迷宫蛋
日期:2011-11-24 10:38:342012新春纪念徽章
日期:2012-01-04 11:56:44蜘蛛蛋
日期:2013-07-12 21:52:36凯迪拉克
日期:2013-12-12 09:53:072014年新春福章
日期:2014-02-18 16:44:08马上有对象
日期:2014-02-18 16:44:08
3#
 楼主| 发表于 2011-10-31 10:37 | 只看该作者
justlooks 发表于 2011-10-31 10:28
http://bugs.mysql.com/bug.php?id=5588

感觉不是很像啊,This is in place because there are cases where the master may go down and come back up but the slave isn't notified so it stays in waiting on the same connection
然后这个bug上报时间是15 Sep 2004 11:25,版本:4.0.21

使用道具 举报

回复
论坛徽章:
9
蛋疼蛋
日期:2011-10-18 11:00:17ITPUB十周年纪念徽章
日期:2011-11-01 16:25:51蜘蛛蛋
日期:2011-11-09 13:48:06迷宫蛋
日期:2011-11-24 10:38:342012新春纪念徽章
日期:2012-01-04 11:56:44蜘蛛蛋
日期:2013-07-12 21:52:36凯迪拉克
日期:2013-12-12 09:53:072014年新春福章
日期:2014-02-18 16:44:08马上有对象
日期:2014-02-18 16:44:08
4#
 楼主| 发表于 2011-10-31 10:46 | 只看该作者
Error reading packet from server: Lost connection to MySQL server
暂时诊断为网络问题,谢谢大家的帮助,嘿嘿

使用道具 举报

回复
论坛徽章:
10
2011新春纪念徽章
日期:2011-02-18 11:43:362013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:08:15双黄蛋
日期:2012-04-18 13:03:23蛋疼蛋
日期:2012-02-14 09:01:14复活蛋
日期:2012-02-01 10:04:16双黄蛋
日期:2012-01-16 14:47:262012新春纪念徽章
日期:2012-01-04 11:53:29ITPUB十周年纪念徽章
日期:2011-11-01 16:23:26优秀写手
日期:2013-12-18 09:29:12
5#
发表于 2011-10-31 10:53 | 只看该作者
连不上导致重连,注意最后一个家伙他提到5.5也有这个问题

使用道具 举报

回复
论坛徽章:
9
蛋疼蛋
日期:2011-10-18 11:00:17ITPUB十周年纪念徽章
日期:2011-11-01 16:25:51蜘蛛蛋
日期:2011-11-09 13:48:06迷宫蛋
日期:2011-11-24 10:38:342012新春纪念徽章
日期:2012-01-04 11:56:44蜘蛛蛋
日期:2013-07-12 21:52:36凯迪拉克
日期:2013-12-12 09:53:072014年新春福章
日期:2014-02-18 16:44:08马上有对象
日期:2014-02-18 16:44:08
6#
 楼主| 发表于 2011-10-31 10:57 | 只看该作者
justlooks 发表于 2011-10-31 10:53
连不上导致重连,注意最后一个家伙他提到5.5也有这个问题

恩,应该是网络问题导致机器之间的通信问题,然后Error reading packet from server,产生这个错误,嘿嘿,谢谢了

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表