Getting "Can't find master key from keyring error" after starting full backup

Bug #1582601 reported by Shahriyar Rzayev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Status tracked in 2.4
2.4
Fix Released
High
Sergei Glushchenko

Bug Description

Testing branch -> https://github.com/gl-sergei/percona-xtrabackup/tree/2.4-xb-re-encrypt

Running sysbench:

sysbench --db-driver=mysql --mysql-table-engine=InnoDB --mysql-db=dbtest --mysql-user=root --mysql-password=Baku12345# --mysql-socket=/var/lib/mysql/mysql.sock --num-threads=10 --test=/usr/share/doc/sysbench/tests/db/oltp.lua --max-requests=0 run

Running ALTER INSTANCE ROTATE INNODB MASTER KEY:

[root@ps-pxb-5 ~]# cat alter_rotate_keyring.py
import mysql.connector

cnx = mysql.connector.connect(user='root', password='Baku12345#',
                              host='127.0.0.1',
                              database='dbtest')
cursor = cnx.cursor()

alter_stmt = "ALTER INSTANCE ROTATE INNODB MASTER KEY"

while(True):
 print "Master key rotated"
 cursor.execute(alter_stmt)

cursor.close()
cnx.close()

[root@ps-pxb-5 ~]# python alter_rotate_keyring.py
Master key rotated
Master key rotated
Master key rotated

After starting the backup:
/usr/local/xtrabackup/bin/xtrabackup --defaults-file=/etc/my.cnf --backup --keyring-file-data=/var/lib/mysql-keyring/keyring --server-id=0 --datadir=/var/lib/mysql/ --target-dir=/home/backup_dir/full/ --user=root --password=Baku12345# --no-version-check

Script will rise an error and for fixing this MySQL Server restart is required each time:

[root@ps-pxb-5 ~]# python alter_rotate_keyring.py
Master key rotated
Master key rotated
Master key rotated
mysql.connector.errors.DatabaseError: 3185 (HY000): Can't find master key from keyring, please check keyring plugin is loaded

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-478

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.