List:Replication« Previous MessageNext Message »
From:Johan De Meersman Date:July 15 2013 6:04am
Subject:RE: 2 slaves - one Master; continues to fail
View as plain text  
Can you check the master's errorlog? This smells of nondeterministic updates - and your
story smells of drupal, too :-)

"McGranahan, Jamen" <jamen.mcgranahan@stripped> wrote:
>Suresh,
>
>Here's an example on the Master:
>
>mysql> select * from sessions where
>session_id='bmaoro7earquaq0jd4bn4a4cm0';
>+----------------------------+---------+---------------+--------------------------------------------------------------------------+------------+------------+----------+------+-----------+
>| session_id                 | user_id | ip_address    | user_agent    
>              | created    | last_used  | remember | data | acting_as |
>+----------------------------+---------+---------------+--------------------------------------------------------------------------+------------+------------+----------+------+-----------+
>| bmaoro7earquaq0jd4bn4a4cm0 |    NULL | 66.249.75.188 | Mozilla/5.0
>(compatible; Googlebot/2.1; +http://www.google.com/bot.html) |
>1373844331 | 1373844331 |        0 |      |         0 |
>+----------------------------+---------+---------------+--------------------------------------------------------------------------+------------+------------+----------+------+-----------+
>1 row in set (0.00 sec)
>
>And then here is what is on the Slave:
>
>+----------------------------+---------+---------------+--------------------------------------------------------------------------+------------+------------+----------+------+-----------+
>| session_id                 | user_id | ip_address    | user_agent    
>              | created    | last_used  | remember | data | acting_as |
>+----------------------------+---------+---------------+--------------------------------------------------------------------------+------------+------------+----------+------+-----------+
>| bmaoro7earquaq0jd4bn4a4cm0 |    NULL | 66.249.75.188 | Mozilla/5.0
>(compatible; Googlebot/2.1; +http://www.google.com/bot.html) |
>1373844331 | 1373844331 |        0 |      |         0 |
>+----------------------------+---------+---------------+--------------------------------------------------------------------------+------------+------------+----------+------+-----------+
>1 row in set (0.01 sec)
>
>But I get this error when I start the slave:
>
>Last_SQL_Error: Error 'Duplicate entry 'bmaoro7earquaq0jd4bn4a4cm0' for
>key 'sessions_pkey'' on query. Default database: 'ojs_new'. Query:
>'INSERT INTO sessions
>(session_id, ip_address, user_agent, created, last_used, remember,
>data, acting_as)
>                VALUES
>('bmaoro7earquaq0jd4bn4a4cm0', '66.249.75.188', 'Mozilla/5.0
>(compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
>1373844331, 1373844331, 0, '', 0)'
>
>I don't understand why it is trying to insert it when it is already in
>the table on the slave. The start point in the Master is this:
>
>mysql> show master status;
>+------------------+-----------+--------------+------------------+
>| File             | Position  | Binlog_Do_DB | Binlog_Ignore_DB |
>+------------------+-----------+--------------+------------------+
>| mysql-bin.000468 | 441900005 |              |                  |
>+------------------+-----------+--------------+------------------+
>1 row in set (0.00 sec)
>
>So, I used the CHANGE command on the SLAVE:
>
>CHANGE MASTER TO
>MASTER_HOST='mysql.library.vanderbilt.edu',MASTER_USER='slave4',MASTER_PASSWORD='xxxxxxx',MASTER_LOG_FILE='mysql-bin.000468',MASTER_LOG_POS=441900005;
>
>
>Jamen McGranahan
>Systems Services Librarian
>Vanderbilt University Library
>
>From: Suresh Kuna [mailto:sureshkumarilu@stripped]
>Sent: Sunday, July 14, 2013 5:09 PM
>To: McGranahan, Jamen
>Cc: replication@stripped<mailto:replication@stripped>
>Subject: Re: 2 slaves - one Master; continues to fail
>
>Hi Jamen,
>If you can confirm that you have started with right positions from
>master backup and no writes to slave's then if we still get error's
>then check the records insertion timestamp if those tables have
>timestamp field on update.

-- 
Sent from Kaiten Mail. Please excuse my brevity.
Thread
2 slaves - one Master; continues to failJamen McGranahan14 Jul
  • Re: 2 slaves - one Master; continues to failSuresh Kuna14 Jul
    • RE: 2 slaves - one Master; continues to failJamen McGranahan14 Jul
      • Re: 2 slaves - one Master; continues to failSuresh Kuna14 Jul
  • RE: 2 slaves - one Master; continues to failJamen McGranahan15 Jul
    • RE: 2 slaves - one Master; continues to failJohan De Meersman15 Jul
    • Re: 2 slaves - one Master; continues to failTruls Bergskaug15 Jul
  • Re: 2 slaves - one Master; continues to failJesper Wisborg Krogh15 Jul
    • Re: 2 slaves - one Master; continues to failDivesh Kamra16 Jul
Re: 2 slaves - one Master; continues to failJohan De Meersman15 Jul
  • RE: 2 slaves - one Master; continues to failJamen McGranahan15 Jul
    • Re: 2 slaves - one Master; continues to failJohan De Meersman15 Jul
      • Re: 2 slaves - one Master; continues to failSuresh Kuna15 Jul
        • RE: 2 slaves - one Master; continues to failJamen McGranahan15 Jul
          • Re: 2 slaves - one Master; continues to failSuresh Kuna15 Jul
            • RE: 2 slaves - one Master; continues to failJamen McGranahan15 Jul
              • Re: 2 slaves - one Master; continues to failSuresh Kuna15 Jul
Re: 2 slaves - one Master; continues to failJohan De Meersman17 Jul
Re: 2 slaves - one Master; continues to failJohan De Meersman18 Jul
  • RE: 2 slaves - one Master; continues to failJamen McGranahan18 Jul
    • Re: 2 slaves - one Master; continues to failMarcus Bointon18 Jul
      • RE: 2 slaves - one Master; continues to failJamen McGranahan18 Jul
        • Re: 2 slaves - one Master; continues to failSuresh Kuna18 Jul
          • RE: 2 slaves - one Master; continues to failJamen McGranahan18 Jul
        • Re: 2 slaves - one Master; continues to failMarcus Bointon18 Jul
          • RE: 2 slaves - one Master; continues to failJamen McGranahan18 Jul
            • Re: 2 slaves - one Master; continues to failMarcus Bointon18 Jul
              • RE: 2 slaves - one Master; continues to failJamen McGranahan18 Jul
              • RE: 2 slaves - one Master; continues to failJamen McGranahan22 Jul
                • Re: 2 slaves - one Master; continues to failSuresh Kuna22 Jul