That's pretty strange in this situation, we have three slaves being updated
from the master, the other two are moving along just fine.
This one however can't seem to get past these "duplicate entries". I tried
skip_counter=2 and got a different duplicate entry, the possition moving
forward
again. Incresed skip_counter again... Now the slave is running, but not
going anywhere, slave position is like 2.5 million where the master is at
about 17 million. Bah, I think i'll just start this slave over again from
the base, unfortunately there is a great deal of catching up to do

So in skipping these transactions, am I losing data?


-----Original Message-----
From: chad kellerman [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 11:57 AM
To: Luc Foisy
Cc: [EMAIL PROTECTED]
Subject: Re: MySQL replication error


Luc,

    The problem is that in the replication somewhere an update was taken
twice.  Adjust the skip to according to the position of the duplicate entry.
I have had to skip 100 before in order to get the slave started.

        First check the binary log and see how many insert statements after
the error "path to mysql/bin/mysqlbinlog QBSLIXDB1-bin.log".  There had to
be a reason why the rep stop syncing ( did you run a myisam check on the
master and it removed something??).  Check the log to see what transaction
failed or duplicated itself.  Normally you can skip that transaction on the
slave and start up the slave.  But if therea are other transaction out of
sync after the first failed transaction you will have to keep skipping the
transactions. Until the slave kicks up.  

     It kinda hard to tell with out seeing the binary log file as to how
many you have to skip or even which one to skip.

  But as soon as you hit the duplicate transaction witht he skip, the slave
will start.

  Let me know the scoop...

-chad
  

On Fri, 22 Feb 2002 11:29:41 -0500
Luc Foisy <[EMAIL PROTECTED]> wrote:

> 
> Chad, this did not work. Though it did do something, the Position jumped
> ahead
> 
> mysql> show slave status\G
> *************************** 1. row ***************************
>         Master_Host: 209.217.92.34
>         Master_User: repslave2
>         Master_Port: 3306
>       Connect_retry: 60
>            Log_File: QBSLXDB1-bin.029
>                 Pos: 2596608
>       Slave_Running: No
>     Replicate_do_db: qbslive
> Replicate_ignore_db:
>          Last_errno: 1062
>          Last_error: error 'Duplicate entry '1376034' for key 1' on query
> 'INSERT INTO DISPATCHLOG (CreateStamp) VALUES (NOW())'
>        Skip_counter: 1
> 1 row in set (0.00 sec)
> 
> mysql> set sql_slave_skip_counter = 1;
> Query OK, 0 rows affected (0.01 sec)
> 
> mysql> slave start;
> Query OK, 0 rows affected (0.00 sec)
> 
> mysql> show slave status\G
> *************************** 1. row ***************************
>         Master_Host: 209.217.92.34
>         Master_User: repslave2
>         Master_Port: 3306
>       Connect_retry: 60
>            Log_File: QBSLXDB1-bin.029
>                 Pos: 2596630
>       Slave_Running: No
>     Replicate_do_db: qbslive
> Replicate_ignore_db:
>          Last_errno: 1062
>          Last_error: error 'Duplicate entry '1376034' for key 1' on query
> 'INSERT INTO DISPATCHLOG (CreateStamp) VALUES (NOW())'
>        Skip_counter: 0
> 1 row in set (0.00 sec)
> 
> 
> -----Original Message-----
> From: chad kellerman [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 21, 2002 5:18 PM
> To: Luc Foisy
> Cc: [EMAIL PROTECTED]
> Subject: Re: MySQL replication error
> 
> 
> 
> Luc,
> 
>   I new to this mailinglist ( this is my first posting)  But I have worked
a
> little with replication.
> 
> Try if the replicator is still down.
> 
> set sql_slave_skip_counter = 1; slave start
> 
> on the slave as long as you are sure the master is ok.
> 
> Let me know is this worked.
> 
> -chad
> 
> 
> 
> On Thu, 21 Feb 2002 15:48:08 -0500
> Luc Foisy <[EMAIL PROTECTED]> wrote:
> 
> > Would anyone be able to tell me why this happened, and how I could fix
it?
> > 
> > mysql> show slave status\G
> > *************************** 1. row ***************************
> >         Master_Host: 209.217.92.34
> >         Master_User: repslave2
> >         Master_Port: 3306
> >       Connect_retry: 60
> >            Log_File: QBSLXDB1-bin.029
> >                 Pos: 2596608
> >       Slave_Running: No
> >     Replicate_do_db: qbslive
> > Replicate_ignore_db:
> >          Last_errno: 1062
> >          Last_error: error 'Duplicate entry '1376034' for key 1' on
query
> > 'INSERT INTO DISPATCHLOG (CreateStamp) VALUES (NOW())'
> >        Skip_counter: 0
> > 
> > err_log
> > 020221 14:21:12  mysqld started
> > /usr/local/libexec/mysqld: ready for connections
> > 020221 14:21:14  Slave: connected to master
> '[EMAIL PROTECTED]:3306',
> > replication started in log 'QBSLXDB1-bin.029' at position
> > 2596608
> > ERROR: 1062  Duplicate entry '1376034' for key 1
> > 020221 14:21:14  Slave:  error running query 'INSERT INTO DISPATCHLOG
> > (CreateStamp) VALUES (NOW())'
> > 020221 14:21:14  Error running query, slave aborted. Fix the problem,
and
> > re-start the slave thread with "mysqladmin start-slave". We s
> > topped at log 'QBSLXDB1-bin.029' position 2596608
> > 020221 14:21:14  Slave thread exiting, replication stopped in log
> > 'QBSLXDB1-bin.029' at position 2596608
> > 
> > 
> > Luc Foisy
> > 
> > Technical Magic - www.technical-magic.com
> > 1 Stafford Road, Suite 325, Nepean, Ontario, K2H 1B9
> > Phone: (613) 829-7117 Fax: (613) 596-5096
> > E-Mail: [EMAIL PROTECTED]
> > 
> > <<<<< Fulfilling the Promise of Technology >>>>>
> > 
> > 
> > ---------------------------------------------------------------------
> > Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list archive)
> > 
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> > 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to