GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

Error on replication, need some help.

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error on replication, need some help.

    Hi, all. I'm new in Percona, i have a master server running Percona xtradb, and a replication slave running in percona too, it replicate just fine. My problem exist on another slave machine which running standard MySQL. Below are the error i get:

    Last_Errno: 0
    Last_Error: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.

    Does that mean only Percona Slave can replicate from Percona Master? Or is there setting that i miss out to get Standard MySQL to be able to replicate from Percona Master?

    Thanks in advance for help.

  • #2
    Percona Slave can replicate from a Standard MySQL, there are no incompatibilities at binary log level. That error means that master or slave's relay log is corrupted and then can't continue reading it. Can you paste the full SHOW SLAVE STATUS\G and also the version number of master and slaves.

    Comment


    • #3
      Master: Server version: 5.5.28-log Percona XtraDB Cluster (GPL), wsrep_23.7.r3821
      Slave: Server version: 5.0.77-log Source distribution

      Slave_IO_State: Waiting for master to send event
      Master_Host: ******.com
      Master_User: rep
      Master_Port: 3306
      Connect_Retry: 60
      Master_Log_File: mysql-bin.000070
      Read_Master_Log_Pos: 182631007
      Relay_Log_File: teckkongtbj-relay-bin.2828243
      Relay_Log_Pos: 534
      Relay_Master_Log_File: mysql-bin.000070
      Slave_IO_Running: Yes
      Slave_SQL_Running: No
      Replicate_Do_DB: csposxe,csposxehq
      Replicate_Ignore_DB:
      Replicate_Do_Table:
      Replicate_Ignore_Table: csposxehq.yiisession,csposxe.reportcontrol,csposxe hq.ReportD ata,csposxe.reportdata,csposxe.yiisession
      Replicate_Wild_Do_Table:
      Replicate_Wild_Ignore_Table:
      Last_Errno: 0
      Last_Error: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.
      Skip_Counter: 0
      Exec_Master_Log_Pos: 158467795
      Relay_Log_Space: 43352744
      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: NULL



      I try to check the relay log and found something really weird as below:
      Quote:
      /*!40019 SET @@session.max_insert_delayed_threads=0*/;
      /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_ TYPE=0*/;
      DELIMITER /*!*/;
      # at 4
      #130408 23:57:03 server id 3 end_log_pos 98 Start: binlog v 4, server v 5.0.77-log created 130408 23:57:03
      # at 98
      #700101 7:30:00 server id 1 end_log_pos 0 Rotate to mysql-bin.000070 pos: 158467505
      # at 141
      #130402 1:19:28 server id 1 end_log_pos 0 Start: binlog v 4, server v 5.5.28-log created 130402 1:19:28
      # at 244
      #130408 7:04:36 server id 1 end_log_pos 158467626 Query thread_id=48927 exec_time=0 error_code=0
      use mysql/*!*/;
      SET TIMESTAMP=1365375876/*!*/;
      SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1/*!*/;
      SET @@session.sql_mode=0/*!*/;
      /*!\C latin1 *//*!*/;
      SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
      DROP TABLE IF EXISTS `yongger2` /* generated by server */
      /*!*/;
      # at 365
      #130408 7:04:36 server id 1 end_log_pos 158467726 Query thread_id=48927 exec_time=0 error_code=0
      SET TIMESTAMP=1365375876/*!*/;
      create table yongger2(data LONGBLOB)
      /*!*/;
      # at 465
      #130408 7:04:38 server id 1 end_log_pos 158467795 Query thread_id=48927 exec_time=0 error_code=0
      SET TIMESTAMP=1365375878/*!*/;
      BEGIN
      /*!*/;
      ERROR: Error in Log_event::read_log_event(): 'Found invalid event in binary log', data_len: 49, event_type: 19
      Could not read entry at offset 534:Error in log format or read error
      DELIMITER ;
      # End of log file
      ROLLBACK /* added by mysqlbinlog */;
      /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
      [root@csbackup teckkongtbj]# mysqlbinlog teckkongtbj-relay-bin.2828242
      /*!40019 SET @@session.max_insert_delayed_threads=0*/;
      /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_ TYPE=0*/;
      DELIMITER /*!*/;
      mysqlbinlog: File 'teckkongtbj-relay-bin.2828242' not found (Errcode: 2)
      DELIMITER ;
      # End of log file
      ROLLBACK /* added by mysqlbinlog */;
      /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;

      What is yongger2? I never seen this before in my database, and i try to check percona master bin log, i can see such query too. However the Percona Slave is working just fine.

      I have other Percona Master and Slave server which is different from this 2, and i try to do replication to the same standard mysql server and same error came out too.

      Thanks for help.

      Comment


      • #4
        I found this in Percona Master machine, does it looks weird?

        # at 8320
        #130316 9:46:31 server id 15319 end_log_pos 8391 Query thread_id=7 exec_time=0 error_code=0
        SET TIMESTAMP=1363398391/*!*/;
        BEGIN
        /*!*/;
        # at 8391
        # at 8480
        #130316 9:46:31 server id 15319 end_log_pos 8480 Table_map: `csposxe`.`stock` mapped to number 44
        #130316 9:46:31 server id 15319 end_log_pos 8688 Update_rows: table id 44 flags: STMT_END_F

        BINLOG '
        985DURPXOwAAWQAAACAhAAAAACwAAAAAAAEAB2NzcG9zeGUABX N0b2NrABQD Dw8PDwoEBAQECgsP
        CgsPDwQKDxUZAAoAAwAZAAQEBAQKAAoACgAECgD8/w8=
        985DURjXOwAA0AAAAPAhAAAAACwAAAAAAAEAFP///////wAA8LxMAAAGU1A0 ODM4A01KQwABIAAA
        AAAAkMEE5zJBAABgwQTnMkE7tQ/crgEKU3RvY2tUcmFuc2m6DyBhAQpTdG9j a1RyYW5zA0JPMwAA
        AAAAAAABIAAA8LxMAAAGU1A0ODM4A01KQwABIAAAAAAAQEEE5z JBAABgwQTn MkE7tQ/crgEKU3Rv
        Y2tUcmFuc266D6BtAQpTdG9ja1RyYW5zA0JPMwAAAAAAAAABIA ==

        '/*!*/;
        # at 8688
        #130316 9:46:31 server id 15319 end_log_pos 8715 Xid = 38066
        COMMIT/*!*/;

        Comment


        • #5
          I have search on Google and yongger2 seems to be a table generated malware. In this link they use Cuckoo investigate the attack.

          http://malwaremusings.com/2013/01/07/increase-in-mysql-attac ks-dynamic-analysis-running-the-attack/

          About the first paste it could be a corrupted relay log:

          ERROR: Error in Log_event::read_log_event(): 'Found invalid event in binary log', data_len: 49, event_type: 19
          Could not read entry at offset 534:Error in log format or read error

          The second one seems a row based event, maybe you have the binary log configured with mixed format.

          Comment


          • #6
            binlog_format=ROW

            above is my binlog format set in percona master server. I do not install any application call Cuckoo, could it be Percona server use it without we realize it? Is is something to worry or we can just ignore it?

            Comment


            • #7
              If you haven't created the table yongger2, a small search in google shows that the table was possible created by some kind of malware. So maybe is something to worry about and you should investigate it.

              http://malwaremusings.com/2012/11/28/increase-in-mysql-attac ks-extracting-the-binary-files/

              This links for example shows that yongger2 seems to be used to store a .dll file.

              I have no more information about this, I have no idea about malware or which one could cause this.

              Comment


              • #8
                Problem solved. Reason is Slave mysql version not supporting replicate row binlog format. Fix after upgrading to 5.1
                Thanks

                Comment

                Working...
                X