MySQL Forums
Forum List  »  Replication

Replication - always broken when poweroff one of the nodes
Posted by: TOMASZ SERWANSKI
Date: September 29, 2017 10:25AM

Hello,

GotMySQL on 2 DB servers, seems to work fine - until someting will happen :) In general:
- Replication works perfectly
- When any of servers is rebooted (linux; 'reboot') still both nodes are consistent after restart/reboot
- Unfortunately, when simulating power outage (servers are VMs on Citrix Xen; do it by pressing'force shutdown' from Xen console), passive server becomes active and works fine, but after restarting 'failed' node (previously active, now passive), 'failed' one does not start to replicate from 'new' master' (hope described it clearly); errors are like '..[ERROR] Slave SQL: Error 'Duplicate entry..'

My configs look like below:

[mysqld]
log-bin
server_id=1 #obviously there is '2' on other node
sync_binlog=1
innodb_flush_log_at_trx_commit=1
relay_log_info_repository=table
master_info_repository=table
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

And, to be honest, I have no idea where to look for solution (today tried with 'sync_binlog' and 'innodb_flush_..' - none helped).

Could hopefully anyone advice what may be problem/reason?

regards
Tomasz

Options: ReplyQuote


Subject
Views
Written By
Posted
Replication - always broken when poweroff one of the nodes
818
September 29, 2017 10:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.