Hi friends,
I get just 40M database dump file from My SQL 5.7 and want to import to Percona Cluster. I can’t achieve this and can’t find any reason from net.
The error is
ERROR 1213 (40001) at line 69: WSREP detected deadlock/conflict and aborted the transaction. Try restarting the transaction
My config file is as following:
[I][mysqld]
datadir=/var/lib/mysql
user=mysql
socket=/var/lib/mysql/mysql.sock
port=3306
sql_mode=“STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”
skip-external-locking
key_buffer_size = 128M
skip-name-resolve
tmp_table_size=50M
max_allowed_packet = 1M
table_open_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
slow_query_log=1
event_scheduler=on
Replication Master Server (default)
binary logging is required for replication
log-bin=mysql-bin
required unique id between 1 and 2^32 - 1
defaults to 1 if master-host is not set but will not function as a master if omitted
server-id= 1
Uncomment the following if you are using InnoDB tables
innodb_buffer_pool_size = 384M
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
#pxc-encrypt-cluster-traffic=ON
wsrep_cluster_name=pxc-cluster
wsrep_cluster_address=gcomm://XX.XX.XX.XX,YY.YY.YY.YY,ZZ.ZZ.ZZ.ZZ
wsrep_node_name=call1
wsrep_node_address=XX.XX.XX.XX
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth=sstuser:kurulum
pxc_strict_mode=DISABLED #PERMISSIVE #DISABLED #ENFORCING
wsrep_log_conflicts=ON
wsrep_debug=ON
#Binary logging format - mixed recommended
wsrep_forced_binlog_format=MIXED
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout[/I]
Output of log is
…
[I]2017-12-02T07:10:24.241542Z 461 [Note] WSREP: Cleaning up wsrep-transaction for local query: LOCK TABLES agents_realtime_statuses
WRITE
2017-12-02T07:10:24.241634Z 461 [Note] WSREP: set_query_id(), assigned new next trx id: 1418
2017-12-02T07:10:24.241672Z 461 [Note] WSREP: Cleaning up wsrep-transaction for local query: /*!40000 ALTER TABLE agents_realtime_statuses
DISABLE KEYS /
2017-12-02T07:10:24.241738Z 461 [Note] WSREP: Thread holds MDL locks at TOI begin: /!40000 ALTER TABLE agents_realtime_statuses
DISABLE KEYS / 461
2017-12-02T07:10:24.241759Z 461 [Note] WSREP: Executing Query (/!40000 ALTER TABLE agents_realtime_statuses
DISABLE KEYS /) with write-set (-1) and exec_mode: LOCAL_STATE in TO Isolation mode
2017-12-02T07:10:24.241897Z 461 [Note] WSREP: Query (/!40000 ALTER TABLE agents_realtime_statuses
DISABLE KEYS /) with write-set (3156) and exec_mode: TOTAL_ORDER replicated in TO Isolation mode
2017-12-02T07:10:24.241914Z 461 [Note] WSREP: wsrep: initiating TOI for write set (3156)
2017-12-02T07:10:24.241979Z 461 [Note] WSREP: wsrep: completed TOI write set (3156)
2017-12-02T07:10:24.241999Z 461 [Note] WSREP: Setting WSREPXid (InnoDB): f0062cd7-b62d-11e7-a967-c75103ad8859:3156
2017-12-02T07:10:24.242852Z 461 [Note] WSREP: Completed query (/!40000 ALTER TABLE agents_realtime_statuses
DISABLE KEYS */) replication with write-set (3156) and exec_mode: TOTAL_ORDER in TO Isolation mode
2017-12-02T07:10:24.243000Z 461 [Note] WSREP: set_query_id(), assigned new next trx id: 1419
2017-12-02T07:10:24.245458Z 461 [Note] WSREP: wsrep: replicating commit (-1)
2017-12-02T07:10:24.245508Z 461 [Warning] WSREP: SQL statement (INSERT INTO agents_realtime_statuses
VALUES (‘logoff’,10,‘2017-12-01 19:40:09’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,144,15,2581,9,6,0,0,NULL,‘2017-12-01 18:40:02’,0,0,0,0,0,NULL),(‘logoff’,8,‘2017-12-01 16:56:22’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,8,31,6,709,5,1,0,0,NULL,‘2017-12-01 16:50:02’,0,0,0,370,2,NULL),(‘logoff’,7,‘2017-12-01 19:46:04’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,373,46,1202,19,25,0,0,NULL,‘2017-12-01 18:40:00’,0,0,0,59,46,NULL),(‘logoff’,5,‘2017-12-01 14:56:20’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,‘1512125646.28799’,NULL,NULL,0,20,3,0,0,2,0,0,NULL,‘2017-12-01 14:42:34’,0,0,0,0,20,NULL),(‘logoff’,6,‘2017-12-01 19:03:36’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,50,5,0,0,5,0,0,NULL,‘2017-12-01 19:00:18’,0,0,0,0,0,NULL),(‘logoff’,11,‘2017-12-01 21:00:48’,NULL,NULL,‘cybernet-ministry-yardim’,
2017-12-02T07:10:24.245533Z 461 [Note] WSREP: commit action failed for reason: WSREP_TRX_FAIL THD: 461 Query: INSERT INTO agents_realtime_statuses
VALUES (‘logoff’,10,‘2017-12-01 19:40:09’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,144,15,2581,9,6,0,0,NULL,‘2017-12-01 18:40:02’,0,0,0,0,0,NULL),(‘logoff’,8,‘2017-12-01 16:56:22’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,8,31,6,709,5,1,0,0,NULL,‘2017-12-01 16:50:02’,0,0,0,370,2,NULL),(‘logoff’,7,‘2017-12-01 19:46:04’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,373,46,1202,19,25,0,0,NULL,‘2017-12-01 18:40:00’,0,0,0,59,46,NULL),(‘logoff’,5,‘2017-12-01 14:56:20’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,‘1512125646.28799’,NULL,NULL,0,20,3,0,0,2,0,0,NULL,‘2017-12-01 14:42:34’,0,0,0,0,20,NULL),(‘logoff’,6,‘2017-12-01 19:03:36’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,50,5,0,0,5,0,0,NULL,‘2017-12-01 19:00:18’,0,0,0,0,0,NULL),(‘logoff’,11,'2017-12-0
2017-12-02T07:10:24.245543Z 461 [Note] WSREP: conflict state: NO_CONFLICT
2017-12-02T07:10:24.245551Z 461 [Note] WSREP: --------- CONFLICT DETECTED --------
2017-12-02T07:10:24.245558Z 461 [Note] WSREP: cluster conflict due to certification failure for threads:
2017-12-02T07:10:24.245584Z 461 [Note] WSREP: Victim thread:
THD: 461, mode: local, state: executing, conflict: cert failure, seqno: -1
SQL: INSERT INTO agents_realtime_statuses
VALUES (‘logoff’,10,‘2017-12-01 19:40:09’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,144,15,2581,9,6,0,0,NULL,‘2017-12-01 18:40:02’,0,0,0,0,0,NULL),(‘logoff’,8,‘2017-12-01 16:56:22’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,8,31,6,709,5,1,0,0,NULL,‘2017-12-01 16:50:02’,0,0,0,370,2,NULL),(‘logoff’,7,‘2017-12-01 19:46:04’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,373,46,1202,19,25,0,0,NULL,‘2017-12-01 18:40:00’,0,0,0,59,46,NULL),(‘logoff’,5,‘2017-12-01 14:56:20’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,‘1512125646.28799’,NULL,NULL,0,20,3,0,0,2,0,0,NULL,‘2017-12-01 14:42:34’,0,0,0,0,20,NULL),(‘logoff’,6,‘2017-12-01 19:03:36’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,50,5,0,0,5,0,0,NULL,‘2017-12-01 19:00:18’,0
2017-12-02T07:10:24.245793Z 461 [Note] WSREP: Cleaning up wsrep-transaction for local query: INSERT INTO agents_realtime_statuses
VALUES (‘logoff’,10,‘2017-12-01 19:40:09’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,144,15,2581,9,6,0,0,NULL,‘2017-12-01 18:40:02’,0,0,0,0,0,NULL),(‘logoff’,8,‘2017-12-01 01 14:56:20’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,‘1512125646.28799’,NULL,NULL,0,20,3,0,0,2,0,0,NULL,‘2017-12-01 14:42:34’,0,0,0,0,20,NULL),(‘logoff’,6,‘2017-12-01 19:03:36’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,50,5,0,0,5,0,0,NULL,‘2017-12-01 19:00:18’,0,0,0,0,0,NULL),(‘logoff’,11,‘2017-12-01 21:00:48’,NULL,
2017-12-02T07:10:24.245841Z 461 [Note] WSREP: Retrying auto-commit query (on abort): INSERT INTO agents_realtime_statuses
VALUES (‘logoff’,10,‘2017-12-01 19:40:09’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,144,15,2581,9,6,0,0,NULL,‘2017-12-01 18:40:02’,0,0,0,0,0,NULL),(‘logoff’,8,‘2017-12-01 01 14:56:20’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,‘1512125646.28799’,NULL,NULL,0,20,3,0,0,2,0,0,NULL,‘2017-12-01 14:42:34’,0,0,0,0,20,NULL),(‘logoff’,6,‘2017-12-01 19:03:36’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,50,5,0,0,5,0,0,NULL,‘2017-12-01 19:00:18’,0,0,0,0,0,NULL),(‘logoff’,11,‘2017-12-01 21:00:48’,NULL,NULL,'cy
2017-12-02T07:10:24.245863Z 461 [Note] WSREP: Assigned new trx id to retry auto-commit query: 1419
2017-12-02T07:10:24.246301Z 461 [Note] WSREP: wsrep: replicating commit (-1)
2017-12-02T07:10:24.246336Z 461 [Warning] WSREP: SQL statement (INSERT INTO agents_realtime_statuses
VALUES (‘logoff’,10,‘2017-12-01 19:40:09’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,144,15,2581,9,6,0,0,NULL,‘2017-12-01 18:40:02’,0,0,0,0,0,NULL),(‘logoff’,8,‘2017-12-01 16:56:22’,NULL,NULL,‘cybernet-ministry-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,‘1512125646.28799’,NULL,NULL,0,20,3,0,0,2,0,0,NULL,‘2017-12-01 14:42:34’,0,0,0,0,20,NULL),(‘logoff’,6,‘2017-12-01 19:03:36’,NULL,NULL,‘cybernet-ministry-yardim’,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,50,5,0,0,5,0,0,NULL,‘2017-12-01 19:00:18’,0,0,0,0,0,NULL),(‘logoff’,11,‘2017-12-01 21:00:48’,NULL,NULL,‘cybernet-ministry-yardim’,
2017-12-02T07:10:24.246353Z 461 [Note] WSREP: commit action failed for reason: WSREP_TRX_FAIL THD: 461 Query: INSERT INTO agents_realtime_statuses
VALUES (‘logoff’,10,'2017-[/I]
…
I can’t find the reason.
PLEASE HELP ME. IT IS URGENT!!!
Thanks!!!