On Sat, Feb 09, 2002 at 09:41:25PM -0700, Sasha Pachev wrote:
>
> * Monitor your slave to make sure it does not crash ( watch error log for
> stack trace messages), slave keeps running ( check with SHOW SLAVE STATUS),
> and data is consistent.
>
> * If there are problems, I will need the following:
>
> - error logs on the master and on the slave
> - binary logs on the master, binary logs on the slave, and relay logs on
> the slave ( by default, placed in datadir and called `hostname`-relay-bin.* )
> - output of SHOW SLAVE STATUS
> - version of the master
Okay, I've hit a bug. It happened after the slave had replicated
about 5,397,000 queries.
I have a 4.0.2 slave runinng on FreeBSD (built from bitkeeper). It's
master is a 3.23.47-max on Linux.
The slave hit a duplicate key error and died. The IO thread appears
to still be running, but the SQL thread is not. When I try to do a
"SLAVE START" on the slave, the command never returns to the "mysql> "
prompt.
The master error log has nothing in it. The last error was written
days ago. The slave's status looks like this:
---snip---
mysql> show slave status \G
*************************** 1. row ***************************
Master_Host: db.finance.yahoo.com
Master_User: repl
Master_Port: 3306
Connect_retry: 15
Master_Log_File: binary-log.015
Read_Master_Log_Pos: 375301751
Relay_Log_File: db3-relay-bin.002
Relay_Log_Pos: 84505219
Relay_Master_Log_File: binary-log.015
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_do_db:
Replicate_ignore_db:
Last_errno: 1062
Last_error: error 'Duplicate entry 'AAI' for key 1' on
query '
INSERT INTO SymbolDirty
SELECT DISTINCT Symbol,0
FROM udtable
WHERE Date=20020208
AND Pubdate <= 20020211000001
'
Skip_counter: 0
Exec_master_log_pos: 51217892
1 row in set (0.00 sec)
---snip---
The slave's relay log (db3-relay-bin.002) is about 400MB in size and
still growing, so that thread is alive and kicking. Strangely, the
db3-relay-bin.001 file is no longer around. If you want the whole
log, I can zip it up and upload it. Just let me know what you need.
Here are the relevant bits of the slave's error log.
---snip---
/home/mysql-4-bk/libexec/mysqld: ready for connections
020210 16:48:26 Slave SQL thread initialized, starting replication in log 'FIRST' at
position 0,relay log: name='./db3-relay-bin.001',pos='4'
020210 16:48:26 Slave I/O thread: connected to master
'[EMAIL PROTECTED]:3306', replication started in log 'binary-log.013' at
position 538131481
ERROR: 1062 Duplicate entry 'INMX' for key 1
020211 4:16:21 Slave: error 'Duplicate entry 'INMX' for key 1' on query '
INSERT INTO SymbolDirty
SELECT DISTINCT Symbol,0
FROM udtable
WHERE Date=20020208
AND Pubdate <= 20020211000001
', error_code=1062
020211 4:16:21 Error running query, slave SQL thread aborted. Fix the problem, and
restart the slave SQL thread with "SLAVE START". We stopped at log 'binary-log.015'
position 51217892
020211 4:16:21 Slave SQL thread exiting, replication stopped in log
'binary-log.015' at position 51217892
020211 11:42:45 Slave SQL thread initialized, starting replication in log
'binary-log.015' at position 51217892,relay log:
name='./db3-relay-bin.002',pos='84505219'
ERROR: 1062 Duplicate entry 'AAI' for key 1
020211 11:42:45 Slave: error 'Duplicate entry 'AAI' for key 1' on query '
INSERT INTO SymbolDirty
SELECT DISTINCT Symbol,0
FROM udtable
WHERE Date=20020208
AND Pubdate <= 20020211000001
', error_code=1062
020211 11:42:45 Error running query, slave SQL thread aborted. Fix the problem, and
restart the slave SQL thread with "SLAVE START". We stopped at log 'binary-log.015'
position 51217892
020211 11:42:45 Slave SQL thread exiting, replication stopped in log
'binary-log.015' at position 51217892
---snip---
Thanks,
Jeremy
--
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936
MySQL 3.23.47-max: up 4 days, processed 153,526,506 queries (419/sec. avg)
---------------------------------------------------------------------
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