Master Slave Replication
Posted: Sun Jun 27, 2010 6:49 am
I was creating a master slave replication on nagios. The issue that I have is that, once all the configuration is completed, the slave does try and synch with the master, but when I issue the command show slave status\G, it returns the following error:
Slave_IO_Running: yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1062
Last_Error: Error 'Duplicate entry '1-81-2010-06-27 06:23:01-239871' for key 2' on query. Default database: 'nagios'. Query: 'INSERT INTO nagios_hostchecks SET instance_id='1', host_object_id='81', check_type='0', is_raw_check='0', current_check_attempt='1', max_check_attempts='10', state='0', state_type='1', start_time=FROM_UNIXTIME(1277637781), start_time_usec='239871', end_time=FROM_UNIXTIME(1277637791), end_time_usec='123718', timeout='30', early_timeout='0', execution_time='0.021770', latency='0.239000', return_code='0', output='', perfdata='(null)', command_object_id='1', command_args='', command_line='' ON DUPLICATE KEY UPDATE instance_id='1', host_object_id='81', check_type='0', is_raw_check='0', current_check_attempt='1', max_check_attempts='10', state='0', state_type='1', start_time=FROM_UNIXTIME(1277637781), start_time_usec='239871', end_time=FROM_UNIXTIME(1277637791), end_time_usec='123718', timeout='30', early_timeout='0', execution_time='0.021770', latency='0.239000', return_code='0', output='', perfdata='
Skip_Counter: 0
Before this error, the Slave_sql_running is YES. I went and deleted the table causing the error from both master and slave just for testing, and then it gave the same error for another table, I deleted that as well, then it started replicating with no issues. I was hoping someone would be able to help me out with this issue, I just need to know why these two tables, nagios_hostchecks and nagios_timedeventqueue, are generating errors on replication, and what can I do to resolve this. I would really appreciate any advice that anyne can give me.
Thank You
Hani Masood
Slave_IO_Running: yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1062
Last_Error: Error 'Duplicate entry '1-81-2010-06-27 06:23:01-239871' for key 2' on query. Default database: 'nagios'. Query: 'INSERT INTO nagios_hostchecks SET instance_id='1', host_object_id='81', check_type='0', is_raw_check='0', current_check_attempt='1', max_check_attempts='10', state='0', state_type='1', start_time=FROM_UNIXTIME(1277637781), start_time_usec='239871', end_time=FROM_UNIXTIME(1277637791), end_time_usec='123718', timeout='30', early_timeout='0', execution_time='0.021770', latency='0.239000', return_code='0', output='', perfdata='(null)', command_object_id='1', command_args='', command_line='' ON DUPLICATE KEY UPDATE instance_id='1', host_object_id='81', check_type='0', is_raw_check='0', current_check_attempt='1', max_check_attempts='10', state='0', state_type='1', start_time=FROM_UNIXTIME(1277637781), start_time_usec='239871', end_time=FROM_UNIXTIME(1277637791), end_time_usec='123718', timeout='30', early_timeout='0', execution_time='0.021770', latency='0.239000', return_code='0', output='', perfdata='
Skip_Counter: 0
Before this error, the Slave_sql_running is YES. I went and deleted the table causing the error from both master and slave just for testing, and then it gave the same error for another table, I deleted that as well, then it started replicating with no issues. I was hoping someone would be able to help me out with this issue, I just need to know why these two tables, nagios_hostchecks and nagios_timedeventqueue, are generating errors on replication, and what can I do to resolve this. I would really appreciate any advice that anyne can give me.
Thank You
Hani Masood